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 » Customise colours made available in CExtGridCellColor Collapse All
Subject Author Date
Vincent Wong Mar 12, 2007 - 4:39 AM

Hi,

Is it possible to access the CExtPopupColorMenuWnd instance tracked by a CExtGridCellColor, so that I can somehow customise the colours made available to the user when the button is pressed?

If not, could you suggest an alternative? The only way I can think of is to create a CExtPopupColorMenuWnd instance manually, on handling the button press of some other grid cell type.

Thanks,

Vincent.

Technical Support Mar 13, 2007 - 1:03 PM

There is a CExtGridCellColor::OnButtonPopupMenuTrack() virtual method which is invoked to track the color popup menu. So you need to create a CExtGridCellColor-derived class and override this method. Just copy the original method’s content and (after creating the CExtPopupColorMenuWnd object) add your customization code in which you can use the RemoveAllColors(), SetColorsInRow() and AddColor() methods as it is demonstrated in the CPagePopupMenus::OnContextMenu() method of the Prof-UIS_Controls sample.