Inherit and save a new
menu
By inheriting from the application sheet menu, you retain the
sheet menu characteristics without modifying the ancestor menu. It is
good practice to save the new menu immediately, then save it again after
you modify it.
-
Click the Inherit button (
) in the PowerBar.The Inherit From Object dialog box displays.
-
Make sure Menus is selected in the Objects of Type drop-down
list box.Select m_pbtutor_sheet in the Object list box and click
OK.PowerBuilder displays an untitled menu that has all the
characteristics of m_pbtutor_sheet.On the inherited sheet menu, the Window menu items are enabled
to allow for tiling and cascading windows, just as they are for the
m_pbtutor_sheet menu. These items are disabled on the
m_pbtutor_frame menu.Changes made to the MDI frame menu
If you click the File menu in the WYSIWYG view, you see that
the first item is now Report. The Open item is dithered to
indicate that it is not visible and is grayed to indicate that it
is disabled. These characteristics were propagated through the
inheritance chain from m_pbtutor_frame. -
Select File>Save from the menu bar.
The Save Menu dialog box displays.
-
Type m_my_sheet as the menu name in the Menus box.
Type the following line in the Comments box:
1New sheet menu for w_master_detail_ancestor and its descendants. -
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_my_sheet menu
appears in the system tree.