Creating new objects using inheritance

One of the most powerful features of PocketBuilder is inheritance. With inheritance, you can create a new window, user object, or menu (a descendent object) from an existing object (the ancestor object).

StepsTo create a new object by inheriting it from an existing object:

  1. Click the Inherit button in the PowerBar, or Select File>Inherit from the menu bar.

  2. In the Inherit From Object dialog box, select the object type (menu, user object, or window) from the Object Type drop-down list. Then select the target as well as the library or libraries you want to look in. Finally, select the object from which you want to inherit the new object.

    Figure 3-11: Inheriting from a window object

    The sample shows the Inherit From Object dialog box. At top are a drop down list for selecting the Target and a list of libraries of the selected target. Next is a list of Objects in the selected library with comments to the right of each object. The sample displays windows objects.  At bottom are a text box for Object Name and a drop down list box labeled Objects of Type, with Windows selected.

    NoteDisplaying objects from many libraries To find an object more easily, you can select more than one library in the Libraries list. Use Ctrl+Click to select additional libraries and Shift+Click to select a range.

  3. Click OK.

    The new object, which is a descendant of the object you chose to inherit from, opens in the appropriate painter.

For more information about inheritance, see Chapter 12, “Understanding Inheritance.”