Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Changing text of ComboBox item Collapse All
Subject Author Date
Suhai Gyorgy Dec 19, 2006 - 8:03 AM

Dear Support,

I know that the original Windows control of type ComboBox does not allow to change the text of any inserted item. I was just wondering if your CExtComboBoxBase class made this work through its LB_ITEM list. I tried this code, but it didn’t change anything.
pCombo->LbItemGet(i)->LbItemCellGet(0)->m_sItemText = strNewText;
Are you planning on implementing such feature?

Thank you,
Chris.

Technical Support Dec 20, 2006 - 9:18 AM

Please make sure that your combo box is owner drawn.

Suhai Gyorgy Dec 21, 2006 - 1:35 AM

Actually it is your CExtPropertyGridComboBoxBar, so it’s not owner drawn. I change the name of some PropertyStore as a result of a message in runtime and I was just trying to reflect that change in the ComboBox as well. Since I couldn’t change the text, right now my code removes the PropertyStore and inserts it again, now with the correct name. I was just wondering if I could just change the text in the ComboBox’s list.

Technical Support Dec 21, 2006 - 11:38 AM

It is not possible to change the text and height of an item in the combo box without reinserting it. The items in the combo box on the main dialog window in the IconEditor sample have a variable height and display different content depending on the combo box width. This is possible only due to re-inserting combo box items when its changes.