How to add a Horizontal Scroll Bar to CListBox
-
-
Hi I am using a CListBox control in my dialog. I have set the Horizontal Scroll bar property to TRUE but I am not getting horizontal scroll bar . String items added are hiding in the CListBox. Please tell me how can I do this? Thanks in advance. ......
Have you checked the control's horizontal extent?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
Hi I am using a CListBox control in my dialog. I have set the Horizontal Scroll bar property to TRUE but I am not getting horizontal scroll bar . String items added are hiding in the CListBox. Please tell me how can I do this? Thanks in advance. ......
When you add a list box with a horizontal scroll bar to a dialog box using MFC classes, the scroll bar will not automatically appear in your application. To make the scroll bar appear Set a maximum width for the widest element by calling CListBox::SetHorizontalExtent in your code. Without this value set, the scroll bar will not appear, even when the items in the list box are wider than the box. void SetHorizontalExtent( int cxExtent ); http://msdn.microsoft.com/en-us/library/1s0xed6b(VS.80).aspx Cheers, BIJU
-
When you add a list box with a horizontal scroll bar to a dialog box using MFC classes, the scroll bar will not automatically appear in your application. To make the scroll bar appear Set a maximum width for the widest element by calling CListBox::SetHorizontalExtent in your code. Without this value set, the scroll bar will not appear, even when the items in the list box are wider than the box. void SetHorizontalExtent( int cxExtent ); http://msdn.microsoft.com/en-us/library/1s0xed6b(VS.80).aspx Cheers, BIJU