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 » How to update toolbar controls Collapse All
Subject Author Date
Malcolm D Apr 15, 2008 - 11:29 PM

I have a number of edit controls and comboboxes on menus (using the customise built in ones).

How are they meant to be updated? i.e. update the text they display. It doesn’t seem like the OnCmdUIUpdate with SetText works in this case either.


 

Technical Support Apr 17, 2008 - 5:06 AM

There is a CExtCustomizeSite::UpdateAllCommandItems() method that updates all visible buttons in the customizable toolbars and menus through MFC. Another method, CExtCustomizeSite::RedrawCommandItems(), redraws all screen buttons with specified command identifiers. The built-in text and combo fields in customizable toolbars and menus do not contain any data. They use CExtCustomizeSite::OnTextFieldInplaceTextGet() to get the text value displayed in the combo box or text filed. So you can update a combo box text on the screen by using the CExtCustomizeSite::RedrawCommandItems() method with passing the command identifier of the combo box to it.