CListBox scrollbar problem
-
I'm having a problem making the horizontal scrollbars appear in a list box in my application. I created it with the dialog editor and have the horizontal & vertical scrollbar boxes checked on the properties dialog. The vertical scrollbar does appear when the enough items are placed in the box. However, the horizontal never appears. i've tried moving controls around to insure their is room for the scroll bars to appear. I've compared the properties to another list box in the application which does display the horiz scroll bars when necessary. Are there any situations that anyone knows which would cause the scroll bars not to appear in a CListBox? Thanks in advance, Bob
-
I'm having a problem making the horizontal scrollbars appear in a list box in my application. I created it with the dialog editor and have the horizontal & vertical scrollbar boxes checked on the properties dialog. The vertical scrollbar does appear when the enough items are placed in the box. However, the horizontal never appears. i've tried moving controls around to insure their is room for the scroll bars to appear. I've compared the properties to another list box in the application which does display the horiz scroll bars when necessary. Are there any situations that anyone knows which would cause the scroll bars not to appear in a CListBox? Thanks in advance, Bob
AFAIR, horizontal scrollbars work only with multi-column listbox. If you want to scroll your items horizontally and you have only one column, consider switching to listview control. Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
-
I'm having a problem making the horizontal scrollbars appear in a list box in my application. I created it with the dialog editor and have the horizontal & vertical scrollbar boxes checked on the properties dialog. The vertical scrollbar does appear when the enough items are placed in the box. However, the horizontal never appears. i've tried moving controls around to insure their is room for the scroll bars to appear. I've compared the properties to another list box in the application which does display the horiz scroll bars when necessary. Are there any situations that anyone knows which would cause the scroll bars not to appear in a CListBox? Thanks in advance, Bob
You need to call
CListBox::SetHorizontalExtent()
. The value passed in the arg will cause the horizontal scrollbar to appear if it's more than the current width of the scrollbar. It's nicer to subclassCListBox
and overrideAddItem()
,InsertItem()
andDeleteItem()
so that they recompute the current max length of the list box's strings and callSetHorizontalExtent()
themselves. /ravi Let's put "civil" back into "civilization" http://www.ravib.com ravib@ravib.com -
You need to call
CListBox::SetHorizontalExtent()
. The value passed in the arg will cause the horizontal scrollbar to appear if it's more than the current width of the scrollbar. It's nicer to subclassCListBox
and overrideAddItem()
,InsertItem()
andDeleteItem()
so that they recompute the current max length of the list box's strings and callSetHorizontalExtent()
themselves. /ravi Let's put "civil" back into "civilization" http://www.ravib.com ravib@ravib.com -
Bob, this[^] is what you should be using! /ravi Let's put "civil" back into "civilization" http://www.ravib.com ravib@ravib.com
-
You need to call
CListBox::SetHorizontalExtent()
. The value passed in the arg will cause the horizontal scrollbar to appear if it's more than the current width of the scrollbar. It's nicer to subclassCListBox
and overrideAddItem()
,InsertItem()
andDeleteItem()
so that they recompute the current max length of the list box's strings and callSetHorizontalExtent()
themselves. /ravi Let's put "civil" back into "civilization" http://www.ravib.com ravib@ravib.comRavi Bhavnani wrote:
You need to call CListBox::SetHorizontalExtent(). The value passed in the arg will cause the horizontal scrollbar to appear if it's more than the current width of the scrollbar.
Thanks for that, i have resolved one of my problem.
Best Regards, Mushq Mushtaque Ahmed Nizamani Software Engineer Ultimus Pakistan "English is my second language; please excuse any grammatical or spelling mistakes"