Menubars and Menubar Components
A dialog can also contain its own menubar. These menubars support cascading menus.
The following components are used to define menu bars and their dependent menus:
• Menubar—The menubar itself is just a container for the menu panes. A dialog can contain only one menubar, and it must contain at least one other component at the top level.
• MenuPane—A menu pane describes a button on a menubar and also acts as a container for the components on the pull-down menu that appears when the user selects the menu pane button.
• Cascade button—A button on a pull-down menu that contains its own menupane. Selecting the cascade button pulls out the menu described by the menupane.
The following components described in the previous topic can also be added to menu panes, but in this case their appearance is automatically modified to suit the style of pull-down menus:
• Check Button—This looks like a regular menu button, but in fact toggles its state. When TRUE, it shows a check mark next to the label.
• Push Button—When added to a menu pane a pushbutton represents a command that causes some action.
• Radio Group—A radio group on a menu pane behaves exactly as it would in the body of a dialog, although the appearance is rather different, as shown in the picture above.
• Separator—A separator can be used to group buttons on a menu pane.