[HOME] [MEL] [API]
Mel Script - Menus in mel
Whenever you start creating user interface's, one of the most useful things you can use is a menu bar on your windows.
Example : A simple menu
This little example creates a menu and attaches it to a window.
{ // create a window with a menu bar window -menuBar true -width 200; // create a tearOff menu menu -label "File" -tearOff true; // add the menu items menuItem -label "New"; menuItem -label "Open"; menuItem -label "Save"; menuItem -divider true; menuItem -label "Quit"; // add a help menu menu -label "Help" -helpMenu true; menuItem -label "About Application..."; // add the other controls columnLayout; button; button; button; showWindow; }
Related Documents
Windows & A quick GUI overview
Layouts
Controls
Attribute Controls
Common Dialogs