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:
В Copy Code _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:
В | Copy Code |
---|---|
_OBROWSER.Caption = "My Class Browser" _OBROWSER.Left = 10 |
To specify the default class library to open in the Class Browser
-
Open the class library in the Class Browser.
-
In the class list of the Class Browser, select the class library.
-
In the Command window, type the following code:
В Copy 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
-
In the Class Browser, click the View Additional File button.
-
In the class list of the Class Browser, select the class library.
-
In the Command window, type the following code:
В Copy Code _oBrowser.SetDefaultFile(.T.)
To remove class libraries from the Class Browser list
-
In the class list of the Class Browser, select the class library.
-
In the Command window, type the following code:
В Copy Code _oBrowser.ResetDefaultFile
To remove all libraries from the Class Browser list
-
In the Command window, type the following code:
В Copy Code _oBrowser.ResetDefaultFile(.T.)