ChangeMenu
PowerScript function
Description
Changes the menu associated with a window. If the window is an MDI
frame window, ChangeMenu appends the list of open sheets to the currently
active menu.
Applies to
Window objects
Syntax
|
1 |
windowname.ChangeMenu ( menuname {, position } ) |
|
Argument |
Description |
|---|---|
|
windowname |
The name of the window for which you want to change the |
|
menuname |
The name of the menu you want to make the current |
|
position (MDI frame windows only) |
The number of the item on the menu bar to which you want |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, ChangeMenu returns null. The return value is
usually not used.
Usage
If you are changing the menu associated with an MDI frame window,
the new menu will not be visible if an open sheet with its own menu is
active. When a sheet has its own menu, the list of open sheets appears on
its menu, as well as on the hidden menu for the frame.
In an MDI frame window, if you change to a menu with a different
menu and toolbar style (traditional or contemporary), the style of the
menu changes but the style of the toolbar does not.
Examples
This statement changes the top-level menu of the w_Employee window
to m_Emp1:
|
1 |
w_Employee.ChangeMenu(m_Emp1) |