Share via


Viewing Class Hierarchies

With the Class Browser, you can see the hierarchy for a class library. You can also view user-defined members for a class and track the inheritance of members between related classes.

To view class members and hierarchies

  1. Run the Class Browser.
  2. Open a class library.
  3. From the Class list, select a class. The Class Browser displays the icon for the class in the Class list and beside the Type drop-down. The user-defined class members are displayed in the Members list.

If Hierarchical mode is selected on the shortcut menu, subclasses are displayed indented beneath parent classes.

For example, if you open Tsbase.vcx in the Visual FoxPro the Visual FoxPro ...\Samples\Tastrade\Libs directory, you can select tsbaseform to view its user-defined members, and then select its subclass, tsmaintform, to view its members.

When a class is selected, you can easily view its parent.

To view the parent class

  • Right-click the class and then choose Select ParentClass from the shortcut menu. The Class Browser selects the parent class.

If the class has a chevron (<<) next to it, its parent class is located in a class library (.vcx) that is not displayed in the class list. When you choose Select ParentClass from the class shortcut menu, the class library containing the parent class is added to the class list, and the parent class is selected.

For example, open Customer.scx from the Visual FoxPro ...\Samples\Tastrade\Form directory, right-click the frmcustomers folder icon, and choose Select ParentClass. The Class Browser adds its class library, Tsbase.vcx, to the Class list and selects the tsform class.

You can view multiple class libraries or form files by opening another file in the current Class Browser window or by opening another Class Browser window. You can also open the same file in several Class Browser windows.

See Also

Adding Controls to Forms with the Class Browser | _BROWSER System Variable | Browsing Classes with the Class Browser | Class Browser Buttons | Class Browser Methods | Class Browser Properties | Class Browser Window | Customizing the Class Browser | Filtering the Class Browser Class List | Managing Classes with the Class Browser | Modifying Class Icons and Descriptions | Running the Class Browser | Viewing Class Definition Code