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 » Can i add a button on the PropertyGrid ToolBar? Collapse All
Subject Author Date
George Ross Nov 4, 2005 - 1:07 AM

Hi


 


Can i add a button on the property Grid Toolbar? If yes how can i catch its click?


 


Thans


 


George

Technical Support Nov 7, 2005 - 9:18 AM

Create a CExtProperyGridCtrl-derived class and override the CExtPropertyGridCtrl::OnPgcCreateBars() virtual method in it. In this method, invoke the very same method of the parent first, find the CExtPropertyGridToolBar-created window, and insert additional buttons into it by invoking the CExtToolControlBar::InsertButton() or CExtToolControlBar::InsertSpecButton() method. Do not forget to create a unique command profile in the command manager. You should register the command identifier for your toolbar button before inserting this button into the toolbar. This is enough to see your custom button in property grid control’s toolbar. This button is disabled so far.

If you create some window inside the property grid control with the dialog control identifier same as toolbar button’s command identifier, then the property grid will automatically handle and update the toolbar button which shows your custom window and hide others created by default tree grids displaying properties.

If you need simply to handle clicks on the button in the toolbar, just override the OnCmdMsg() virtual method in your CExtProperyGridCtrl-derived class, filter the command invoking and updating requests for your toolbar button and invoke the parent method.