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 General Discussion » i want to insert imagelist in my customization combobox Collapse All
Subject Author Date
anil vyas Jul 4, 2007 - 7:03 AM

Hi.
I have problem related to combobox of customization
1.I want to insert Image list through CExtImageList In My customization ComboBox Of my toolbar.How is it possible?
Is there any class available?I want to use SetImageList() only.Is It Possible?
In CExtCustomizeSite::PopListBoxInitContent() parameters.Can I make use CComboBoxEx instead of CListBox.If use then how to do it?
2.If u have any other solution then suggest.
3.If Insert CComboBox with CExtToolControlBar::SetButtonCtrl().Then CComboBoxEx is MFC class.So How to solve?
4.I have two combobox.I want to make my one combo non-editable also.

anil vyas Jul 6, 2007 - 6:12 AM

hi,
1.I uses OnPopupListboxItemDraw(),OnPopupListboxItemMeasure() to set bitmap in ComboBox.It works fine.But when i select an item and set corresponding item in combo text.Then only text item will get set in combo text.but it doesn’t set bitmap with text.So How is it possible?
2.I want set menu font .I uses m_wndMenuBar.SetFont (); After m_wndMenuBar.Create().But it doesn’t set corresponing font.I serch in Prof-uis MSDN.But there is not any function available to set font of menubar.How is it possible?

Technical Support Jul 4, 2007 - 10:29 AM

The customizable toolbars and menus are based on the CExtCustomizeCmdTreeNode command tree nodes. This design allows the customization subsystem to implement such compound features as command tree cloning during drag-n-drop and automatic synchronization of text fields and combo box fields. Both text fields and combo box are built-in UI items provided by the customization subsystems. The combo boxes and other common controls should not be used in customizable toolbars and menus because the customization subsystem does not know how to create multiple copies of them and how to perform their synchronization. Besides, the built-in fields does not contain any data: text field does not contain the text and combo field does not contain the list of items. You need to override a small set of virtual functions to manage these fields: provide them with text/item list, handle input changes and/or repaint them. The CExtCustomizeSite::OnTextField***() virtual methods should be implemented for text fields. The CExtCustomizeSite::OnPopupListBox***() virtual methods should be implemented for combo box fields. You can take a look at their implementations in the CMainFrame class of the StyleEditor sample application. By default the items in the popup list box displayed by the built-in combo box field are having the classic look. The StyleEditor sample application demonstrates how to repaint list box items and you can see style and font list boxes there. You should use the same approach to code your own custom list boxes including image displaying with/without text.

As for non-editable combo box field: you should apply the __ECTN_TBB_TF_NE style to the text field/combo box field command tree node with invoking of the CExtCustomizeCmdTreeNode::ModifyFlags() method to remove in-place editor.