WebMenu for ASP


ToolBar Mode
                                                                                                

The build-in MenuBar in WebMenu 5.0 can be customized to make it look and act like a ToolBar control.

Appearance:

The ToolBar appearance can be achieved for a MenuBar item by setting the following properties on the associated Group object:

Group.Caption = "[Group Name]";
Group.IconWidth = 16;
Group.IconHeight = 16;
Group.IconImage = "icon.gif";
Group.IconToolTip = "ToolTip Text";

Placing brackets around the Caption property allows a placeholder name to be attached to the Group object, which is not displayed when the control is rendered inside the web browser. The new IconWidth, IconHeight, IconImage and IconToolTip properties allow the configuration of the MenuBar item's appearance and optional popup tooltip.

Behavior:

The ToolBar behavior can be achieved for a MenuBar item by setting the following properties on the associated Group object:

Group.ClickOnMouseDown = False;
Group.OnMenuBarClick = "alert('Hello, World!')";

Setting the new ClickOnMouseDown property to false allows the MenuBar item to be selected through a standard mouse-click (as opposed to a mouse-down operation). The OnMenuBarClick property allows a client-side action to be executed when the MenuBar item is chosen.

View the Code:

The code is available in the samples directory under:

/Features and Appearance
    /Using MenuBar
        /ToolBar