DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

VxMenu(1vtcl)


VxMenu -- build a menu, given a menu bar and list of items

Synopsis

VxMenu formDialog menuBar menuList defaultCB

Description

Builds a menu, given a menu bar and a list of items. To create a menu bar on a form dialog, you must specify the form dialog to place the menu bar on, the widget name of the menu bar, a list of menu item widgets to place on the menu bar, and a default callback (if no callbacks are specified for the menu items). Menu item widgets are buttons; typically, when a button in a menubar is pressed its callback creates a menu.

Options


formDialog
Sets widgetName of form dialog.

menuBar
Sets widgetName of menubar.

menuList
Sets menu list to build from.

defaultCB
Sets default callback to call if they are not set in the menuList.
Each item in menuList can contain the following indexes:

0
Type: one of pd, hp, cs, bt, or sp.

pd
Pulldown

hp
HelpPulldown

cs
CascadeButton

bt
PushButton

sp
Separator

1
Name: name of the button.

2
Mnemonic.

3
Accelerator.

4
acceleratorString of the button.

5
Callback to associate with the button.

6
If the item is a toggle button, this sets the initial state.
For example:

set menuList { {pd File F} {bt {bt Exit E {pd Edit E} {bt Cut C {bt Copy o {bt Paste P }

set menubar [VtMenuBar $form.menubar] VxMenu $form $menubar $menuList defaultCB

Use VxMenuGetButton to get the reference to a menu item widget; for example:
VxMenuGetButton $dlog "New"

References


25 April 2004
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004