Common Desktop Environment: Application Builder User's Guide

To Create and Attach a Menu

One method of creating and attaching a menu to an object is described in "To Create a Menu" and "To Attach an Existing Menu to an Object". With the method described here you create and attach the menu at one time. Use whichever method is most convenient.

  1. Display the Revolving Property Editor with the object to which you wish to attach a menu selected in the editor.

    Double-click the object in the interface or the Module Browser or choose the appropriate Object Type in the Revolving Property Editor and select the desired object in the Objects list.

  2. Choose Create New Menu from the Pulldown Menu or Popup Menu button available for some objects.

    Pulldown menus are available for menu buttons and menu bars. Popup menus are available for all pane objects and for lists. An Item SubMenu is available for menus themselves.

    The Menu Property Editor will be displayed, with a newly-created menu selected in the Menu Objects list. The menu will have default values for Object Name, Tearoff, Items, Item Label Type, Label, and Item State.

    The Object Name will be of the form "object_type_menu," "object_type_menu2," and so on, depending on what type of object was selected in the property editor when Create New Menu was chosen and how many menus have been created for the current module. The menu will be added to the end of the Menu Objects list, with the name of the current module preceding the menu name.

  3. Edit the menu and click OK to apply the changes and dismiss the Menu Property Editor.

    See "To Edit a Menu" for instructions. You can edit the menu later if you like.

  4. Click Apply or OK in the Revolving Property Editor to attach the menu to the selected object.

    See "Making Connections Between Objects" for instructions for making the menu functional.