GuidoMenuBar
Overview
A GuidoMenuBar is a container object that can hold any number of GuidoMenus. The menu bar is displayed at the top of the window with the label of each GuidoMenu inserted into the bar. When the label text is selected with the mouse or keyboard the menu definition will drop down beneath it.
Synopsis
GuidoMenuBar Name Body
Description
The GuidoMenuBar command when processed defines a bar region that can be displayed at the top of the screen.
Arguments
Name Name is a unique identifier that you assign and is used to differentiate this object from other Guido objects in the menu definition.
Body The body of the menu bar may contain a number of switches to modify the default behaviour. The body begins with an opening curly brace and ends with a closing curly brace. If there is no required body the curly braces {} are required as a place holder for this argument.
Switches The following switches can be used to modify the default behaviour of the menu bar.
| -label text | The -label switch assigns a name to the menu bar that
will be displayed in the menu bar chooser
-label "My Tools" |
| -mode system|user | The -mode switch assigns the menu bar as either system
or user.
Any user created menu should be assigned to the user category.
-mode user |
| -hidden true|false | The -hidden switch determines if the menu bar is visible
when the software first starts
-hidden false |
Common Guido switches reference
Examples
Example 1
GuidoMenuBar cannot be displayed from a form and are only loaded on software startup so a working example cannot be given. The following code segment shows the system main menu bar definition. Notice the use of the GuidoScript command to include menu definitions.
GuidoMenuBar MainMenu {
-label "Main Menu"
-mode system
GuidoScript scripts/menus/file.tcl
GuidoScript scripts/menus/edit.tcl
GuidoScript scripts/menus/create.tcl
GuidoScript scripts/menus/display.tcl
GuidoScript scripts/menus/view.tcl
GuidoScript scripts/menus/inquire.tcl
GuidoScript scripts/menus/tools.tcl
GuidoScript scripts/menus/dtms.tcl
GuidoScript scripts/menus/volumes.tcl
GuidoScript scripts/menus/plotting.tcl
GuidoScript scripts/menus/customise.tcl
GuidoScript scripts/menus/help.tcl
}
|
See Also
Guido
GuidoForm
Common guido switches
GuidoButtonGroup
GuidoCheckBoxMenuItem
GuidoMenuItem
GuidoRadioButtonMenuItem
GuidoSeparator
GuidoMenu
GuidoMenuBar
GuidoPopupMenu
Guido
action events and callbacks