Freigeben über


Filtering the Class Browser Class List

You can use filters such as a Visual FoxPro base class type or a class name to display a specific set of classes in the Class list.

To filter the list of classes

  1. Open a file in the Class Browser.

  2. In the Type box, type a class name or select one from the list.

    -or-

    In the Type box, type a single filter, or several filters separated by a comma. The comma acts as a logical OR: a class needs to match only one filter to be included in the class list.

    The classes matching the filters appear in the class list and the filter you entered is added to the drop-down list. The drop-down list keeps a history of the types and filters you have selected to view in the current instance of the Class Browser window. The list is not saved after the instance is closed.

    **Note   **When you choose Alphabetical, Visual FoxPro evaluates all of the classes. When you choose Hierarchical, the default choice, Visual FoxPro evaluates the parent classes. If a parent class matches the filter, its child classes are evaluated. If the parent class does not match the filter, its child classes are not evaluated and do not appear in the list — even if the child matches the filter.

You can create a filter that combines characters in a class name with wildcards as described in the following table.

search template description
+cTargetName Name must start with cTarget.
%cTargetName% Name contains cTarget.

For example, to view all classes containing the string "mover," type %MOVER%.

-cTarget

- has precedence over other search filters.

Name does NOT contain cTarget.
~cTarget Name contains something similar to cTarget.
cTarget*

An asterisk (*) replaces an unlimited number of characters.

Name contains anything following cTarget.

For example, to view all classes beginning with "VCR," type VCR*.

"cTarget" Name IS cTarget.

If cTarget is not a Base Class, search reports results of class name search.

cTarget If cTarget is a Base Class search will report all members of that Base Class no matter what the name.
[?]cTarget[?]

A question mark replaces a single character. You can use them any place in any quantity.

Name contains cTarget plus the specified unknown characters in the specified relative positions.

For example, to view all classes starting with MsgBox and some number, such as MsgBox1, type MsgBox?.

You can use combinations of search parameters separated by spaces which indicate an OR operator as in the following examples:

If you want this Use an expression like this
The target is a string that must start with "test" but is NOT a "form" class. -%form% +test*
The target is any string that does NOT contain "debug" and starts with "c" OR contains "test". c* %test% -%debug%
The target is any string that does NOT start with "debug" and is similar to "test" OR is the string "myform" ~test -debug* "myForm"

You can also expand your search for classes to include a specific character string in its name or description.

To search by class name and description text

  1. Open a file in the Class Browser, and then choose the Find button.
  2. In the Find Class dialog box, type a string of text you want found.
  3. A list of classes with the string in its name or description appears in the class list. If the list is hierarchical, only the matching parent classes and their associated matching subclasses are in the list. If you want to view any class that has the string of text, choose the alphabetical option.

See Also

Adding Controls to Forms with the Class Browser | Browsing Classes with the Class Browser | Class Browser Buttons | Class Browser Window | Customizing the Class Browser | Managing Classes with the Class Browser | Modifying Class Icons and Descriptions | Running the Class Browser | Viewing Class Definition Code | Viewing Class Hierarchies