toolbar as a menu bar

Bars for Windows Forms Forum

Posted 16 years ago by Ernst
Is it possible to have menu as a dockable toolbar with buttons which look like menu buttons (without black triangles next to the text)?

I'm trying to work around the following problem: there are 2 forms which require different menus but they inherit from a common form class which implements command handling. Unfortunatelly your BarManager can't be properly inherited, so I think of having 2 toolbars which look like menu - one for each form. It looks like I can't have 2 menu bars, right?

Comments (1)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Ernst,

Check out the IBarRenderer.PopupButtonLinkArrowStyle property. If you set it to None for any BarManager that uses that renderer, you shouldn't see any arrows.

Alternatively you could probably add two MenuBars to a single BarManager. The first one added will be treated as the main menu and the other one will probably just get the alternate rendering. This hasn't been tested but you can try it out.

Or to get even more complex, you could make a custom class that inherits DockableToolBar and add this:
/// <summary>
/// Gets the display style of command links in the bar control.
/// </summary>
/// <value>A <see cref="BarControlDisplayStyle"/> that specifies the display style.</value>
BarControlDisplayStyle IBarControl.DisplayStyle {
    get {
        return BarControlDisplayStyle.MenuBar;
That will probably keep the DockableToolBar acting like a DockableToolBar but will make it render like a MenuBar.

Actipro Software Support

The latest build of this product (v24.1.0) was released 5 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.