Partager via


How to: Customize the Class Browser

You can customize the Class Browser by changing the values for its properties and using its methods and events. You can perform additional operations, such as specifying default class libraries to open in the Class Browser, using Class Browser methods. For more information, see Class Browser Properties, Class Browser Methods, and Class Browser Object Members

When you open the Class Browser, the public variable, _oBrowser, is automatically created. You can use this variable to reference or manipulate the Class Browser as you can any form object.

To set properties for the Class Browser

  • In the Command window, use the following syntax to set Class Browser properties that you want to change:

    _oBrowser.Property = newValue
    

For example, after opening the Class Browser, you can use the following lines of code to set the Caption property of the Class Browser to "My Class Browser" and the Left property to 10:

_OBROWSER.Caption = "My Class Browser"
_OBROWSER.Left = 10

To specify the default class library to open in the Class Browser

  1. Open the class library in the Class Browser.

  2. In the class list of the Class Browser, select the class library.

  3. In the Command window, type the following code:

    _oBrowser.SetDefaultFile
    

This resets any previously specified default libraries.

You can specify class libraries to open by default in addition to the default library.

To specify additional libraries to open with the Class Browser

  1. In the Class Browser, click the View Additional File button.

  2. In the class list of the Class Browser, select the class library.

  3. In the Command window, type the following code:

    _oBrowser.SetDefaultFile(.T.)
    

To remove class libraries from the Class Browser list

  1. In the class list of the Class Browser, select the class library.

  2. In the Command window, type the following code:

    _oBrowser.ResetDefaultFile
    

To remove all libraries from the Class Browser list

  • In the Command window, type the following code:

    _oBrowser.ResetDefaultFile(.T.)
    

See Also

Tasks

How to: View Class Hierarchies

How to: Filter the Class Browser Class List

How to: View Class Definition Code

Reference

Class Browser Window

Other Resources

Operating the Class Browser

Managing Classes and Class Libraries