Professional UI Solutions
Site Map   /  Register


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 » Adding style combobox into CExtPropertyGridCtrl Collapse All
Subject Author Date
Kit Kwan Jul 21, 2007 - 4:17 AM

Hi, I’m trying to figure out how to add the style combobox you see in the SyleEditor sample into the grid. Same thing with font combobox. I need them in the grid, not toolbar. I know about CExtGridCellComboBox but I don’t find any of its API allow me to do custom painting for each item. Is this possible at all?

harshad jahagirdar Mar 20, 2008 - 6:42 AM

Pl help


harshad jahagirdar Mar 20, 2008 - 6:31 AM

Hi Kit Kwan,

Did it resolve your problem? I am facing exactly same problem as you, it will be really great if you share your findings with me, Thanks in advance.


Kit Kwan Mar 22, 2008 - 10:24 AM

Sorry, it was just a project for fun, and I actually did not pursue this task after all because it got hard...

Kit Kwan Jul 21, 2007 - 4:27 AM

I shall clarify a bit. Instead of adding the same style and font comboboxes to the grid, I want to do my own custom painting in the combobox. For example, I want to draw a solid line, dotted line, dashed line, etc in the combobox. I notice the SetImageList API to add the icon, but I’m hoping I can draw the entire cell by myself.

Technical Support Jul 21, 2007 - 12:03 PM

You should create and use a custom CExtGridCellComboBox-derived grid cell class and implement at least the following two virtual methods: CExtGridCellComboBox::OnPopupListBoxItemDraw() and CExtGridCellComboBox::OnPopupListBoxItemMeasure(). That is enough to remeasure and repaint each item in the combo box’s popup list box. You can use the original methods defined in the CExtGridCellComboBox class as examples.

Kit Kwan Jul 21, 2007 - 12:44 PM

Thanks for the tip! I will try that.