开发者

Combo being editable C++

I have a com开发者_如何学编程bo in my UI application which must not be editable. In other words I have few items in the drop down combo and user mus tbe able to drop down the combo when clicked anywhere on the combo. However somehow when i click on the arrow only the combo drops down. If I click anywhere in the combo the field becomes editable.

I dont want it to be editable. I know this must be simple. Can anyone help?


In the resource editor in VS, bring up the properties for the combo box. Change the "Type" property to "Drop List".

This is the GUI equivalent to the CBS_DROPDOWNLIST style that anand mentioned.


See the example shown here: CComboBox::Create(). Also refer to combo box style CBS_DROPDOWNLIST.


You can look at this example for a readonly combobox.

Have a look at ReadOnlyComboBox.cpp

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜