[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 Programmer's Guide



MenuBar

All children of a MenuBar must be CascadeButtons or CascadeButtonGadgets. The MenuBar attempts to place its button children in a single row. If it does not have enough room, it tries to wrap the remaining children into additional rows.

An application should treat specially the button, if any, that pulls down a help menu. The application should set the MenuBar RowColumn's XmNmenuHelpWidget to the widget ID of this button. The MenuBar attempts to place this button at one of the lower corners of the MenuBar, as specified by the Motif Style Guide.

In a MenuBar, all buttons typically have associated PulldownMenus. Each PulldownMenu associated with a button in a MenuBar must be a child of the MenuBar. (More precisely, each PulldownMenu's MenuShell must be a child of the MenuBar.) Each button's XmNsubMenuId resource must be set to the widget ID of the associated PulldownMenu. Set XmNsubMenuId to the widget ID of the PulldownMenu RowColumn, not of the PulldownMenu's MenuShell.

The routines XmCreateMenuBar, XmCreateSimpleMenuBar, and XmVaCreateSimpleMenuBar all create MenuBars.


[ Previous | Next | Contents | Glossary | Home | Search ]