Click to See Complete Forum and Search --> : Combo Box


Aparna
May 10th, 1999, 03:49 AM
Hi,
How do i add a horizontal scroll bar for a combo box.
This is very urgent.

Thanks,
Aparna.

BrianOG
May 10th, 1999, 06:12 AM
First set the style (in resource editor or in the Create call).
Then you need to call SetHorizontalExtent to tell the combobox how much you want to be able to scroll. (Have a look at GetTextExtent() to figure out the width of a string).

Rajesh Makhija
May 10th, 1999, 06:12 AM
Since, at design time, there seems to be no way to do this, you may have to derive a class from CComboBox and override its OnCreate and set the WS_HSCROLL style. Look for more explanation in the CComboBox::Create.
Hope this helps