How do you dropdown a Combo Box when clicked?
I have a dropdown combo box on a dialog. Of course, clicking on the dropdown "arrow", the dropdown list opens as it should. If you click on the actual text in the dropdown BEFORE it dropsdown, the text just highlights. How can we force the combo to drop down (open) when the displayed text is clicked on?
Thanks ahead of time....
Re: How do you dropdown a Combo Box when clicked?
Trap for the CBN_SETFOCUS message then send a CB_SHOWDROPDOWN message to the combo box.
Re: How do you dropdown a Combo Box when clicked?
... or if MFC is used, the CComboBox::ShowDropDown can be used
Re: How do you dropdown a Combo Box when clicked?
Quote:
If you click on the actual text in the dropdown BEFORE it dropsdown, the text just highlights. How can we force the combo to drop down (open) when the displayed text is clicked on?
This is normal behavior for Dropdown combo (CBS_DROPDOWN). You may try to change the combo style to Drop List (CBS_DROPDOWNLIST) unless you still need the text to remain selectable.
Combo-Box Styles
Re: How do you dropdown a Combo Box when clicked?
Quote:
Originally Posted by
Igor Vartanov
This is normal behavior for Dropdown combo (CBS_DROPDOWN). You may try to change the combo style to Drop List (CBS_DROPDOWNLIST) unless you still need the text to remain selectable.
Combo-Box Styles
Crap!! I didn't catch that!! That was it. Sometimes the obvious is overlooked. Thank You.