[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'Intuition' (#aros)


Attach a menu strip to a window.


Source position: intuition.pas line 3231

function SetMenuStrip(

  Window: PWindow;

  Menu: PMenu





The window to add the MenuStrip to



The menu to be added to the window above.

Function result

True if all menus have at least one menuitem.


Attaches the menu strip to the window. After calling this routine, if the user presses the menu button, this specified menu strip will be displayed and accessible by the user.

Menus with zero menu items are not allowed.

Note: You should always design your menu strip changes to be a two-way operation, where for every menu strip you add to your window you should always plan to clear that strip sometime. Even in the simplest case, where you will have just one menu strip for the lifetime of your window, you should always clear the menu strip before closing the window. If you already have a menu strip attached to this window, the correct procedure for changing to a new menu strip involves calling ClearMenuStrip() to clear the old first.

The sequence of events should be:

See also



Re-attach a menu strip to a window.



Clear (detach) the menu strip from the window.

Documentation generated on: 2017-01-10