|
 |
|
NOTE: This Design document is subject to change at any time. |
Menu
Syntax: <MENU property-list>Items</MENU>
Defines a menu within zApp. The MENU tag can be used within a Toolbar to create a pulldown menu or submenu. Or it can be used as a global tag to create a named menu later assigned to another control.
For example, here is a global menu defined in the HEAD section and then used to set the right-click context menu of an edit box:
Code: |
<HEAD>
...
<MENU Name='EditMenu'>
<ITEM Action='_EditCut'/>
<ITEM Action='_EditCopy'/>
<ITEM Action='_EditPaste'/>
</MENU>
...
</HEAD>
<WINDOW Name='MainWindow'>
...
<EDIT Name='MyEdit' Menu='EditMenu'/>
...
</WINDOW> |
This allows you to globally define common menus in one place, then refer to them in multiple windows.
To create a local menu within a window, just place the entire definition of the menu within the WINDOW tag (remove the global declaration in the HEAD area).
Toolbar Menus
To create menus within a toolbar, just use the MENU tag and assign a Caption property to the menu. For example:
Code: |
<TOOLBAR Name='MainMenu'>
<MENU Caption='File'>
<ITEM Action='_FileOpen'/>
<ITEM Action='_FileExit'/>
</MENU>
</TOOLBAR> |
|
|