Contact Sales

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

Case Studies

Kinook

Kinook selected Xtreme Toolkit Professional with Visual C++ over many other...

Removing the Expand Button from a ToolBar

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

The Expand Button is the button displayed at the end of a toolbar and it displays a list of the buttons on the toolbar so that the user can easily hide or show them. At the bottom of the list is a customize option to further customize the toolbars.



The code below will remove the Expand Button from all the tool bars.

 

 CommandBars.Options.ShowExpandButtonAlways = False

 

You can also hide the Expand Button for toolbars on an individual basis. To do this, you need to set the value of the ShowExpandButton property for each individual toolbar. This can be used to override the effects of ShowExpandButtonAlways for individual toolbars.

The code below will show the Expand Button for the first toolbar. Note that CommandBar(1) is the ActiveMenubar.

 

 CommandBars(2).ShowExpandButton = True