Add items to the new menu

Next you add items to the untitled menu you just created. You use the WYSIWYG and Properties views.

  1. Right-click the untitled menu in the WYSIWYG view.

  2. Select Insert Submenu Item from the pop-up menu.

    The cursor moves into a blank box that appears at the end of the untitled menu list.

  3. Type Tutorial in the text box and press Enter.

    In the Properties view, the menu item name changes to m_tutorial. If PowerBuilder displays a message that the default name is incorrect, it suggests an alternative name. If this occurs, click OK to accept the suggested name.

  4. Right-click the newly created Tutorial menu item in the WYSIWYG view.

  5. Select Insert Submenu Item from the pop-up menu.

    The cursor moves into a blank box that appears at the end of the Tutorial menu item list.

  6. Type Open in the text box that appears and press Enter.

    In the Properties view, the menu item name changes to m_open.

    Alternative method of inserting menu item names

    You can type Open in the Text box in the Properties view instead of typing it in the box that appears in the WYSIWYG view. In this case, you do not need to press Enter afterwards. To have PowerBuilder automatically reset the menu item name, you will have to clear the Lock Name check box if the Name box is grayed.

  7. Select File > Save from the menu bar.

    The Save Menu dialog box appears.

  8. Type m_main in the Menus box.

  9. Click OK.

    This names the menu. The prefix m_ is standard for menus.

    The name you just assigned to the new menu displays in the title bar of the Menu painter workspace and the m_main menu appears in the system tree.