Contact Sales

Call center available M-F 9:00 - 4:00 US Eastern Time.

Case Studies


Colasoft selected Toolkit Pro with Visual C++ over many...

Removing the ToolBar Gripper

Author: Mike Palmatier
Posted: October 20, 2005
Environment: Visual Basic 6.0

By default, a toolbar will display a gripper that is used to indicate that the toolbar can be "gripped" and moved by the user. The gripper is cosmetic only, removing the gripper will not disable movement of the toolbar. To modify where the toolbar can be docked, if at all, you need to use the EnableDocking method discussed in the Specify where a Toolbar can be Docked article.

The ModifyStyle method is used to remove or replace the gripper of a toolbar. The styles that can be removed or added are stored in the XTPCommandBarStyle enumeration.

The code below removes the gripper from the menu bar and the first toolbar.

 'Remove gripper from the menu bar

 CommandBars.ActiveMenuBar.ModifyStyle XTP_CBRS_GRIPPER, 0


 'Remove gripper from the first toolbar.  Note that Commandbars(1)

 'is the menu bar

 CommandBars(2).ModifyStyle XTP_CBRS_GRIPPER, 0