The Visual Adelia layout manager's search functions are used to select objects based on their type or on the value of certain properties.
A search expression uses the following syntax:
SearchFilter |
→ |
Expression |
| Expression&SearchFilter |
||
Expression |
→ |
Property operator Value |
| Property EXISTS |
||
| Value | ||
Property | → | OBJECT_GROUP |
| OBJECT_NAME | ||
| ASSOCIATED_VAR_NAME | ||
| CONTEXTUAL_MENU | ||
| MENU_TEXT | ||
| MENU_TYPE | ||
| SHORTCUT_KEY | ||
| ACTIVE_MENU | ||
| GRAYED_MENU | ||
| CHECKED_MENU | ||
| VISIBLE_MENU | ||
| DEFAULT_MENU | ||
| ObjectProperty | ||
Operator | → | = |
| <> | ||
| > | ||
| >= | ||
| < | ||
| <= | ||
| CONTAINS | ||
| MATCHES |
Specific search characteristics:
- The search properties are special properties first then the specific properties of an object (NAME, TEXT, X-AXIS, Y-AXIS, etc.). Only alphanumeric, numeric or Boolean properties are searched for.
- When only a value is provided (no valid expression), the expression is interpreted as a text search (TEXT CONTAINS Value).
- To search for a value containing the "&" character (e.g. a button text with a mnemonic), this needs to be escaped (&Add becomes \&Add).
- For Boolean values, the accepted values are TRUE, *TRUE, 1, FALSE, *FALSE, and 0.
The special properties are:
Name | Description |
---|---|
OBJECT_GROUP | Name of an object group declared in the program source. The selected objects will be those that belong to the group. Specific characteristics:
|
OBJECT_NAME | Name (type) of the graphical object as declared in the list of object manager objects (BUTTON, ENTRY_FIELD, etc.). Specific characteristics:
|
ASSOCIATED_VAR_NAME | Searches for the name of the variable associated with a graphical object with a VALUE property. |
CONTEXTUAL_MENU | Search for an object with a context-sensitive menu. Virtual Boolean property "CONTEXTUAL_MENU = TRUE" |
MENU_TEXT | Search for an object with a menu with text which checks the expression. For example, "MENU_TEXT = Files". |
MENU_TYPE | Menu type. String value, the possible values are TEXT, IMAGE or SEPARATOR. |
SHORTCUT_KEY | Keyboard shortcut. Search for the shortcut's string value. Modifiers are specified in order (ctrl, alt then shift). For example "Ctrl+Alt+Enter". |
ACTIVE_MENU | Search for an object with an active context-sensitive menu. Boolean property. |
GRAYED_MENU | Search for an object with a shaded context-sensitive menu. Boolean property. |
CHECKED_MENU | Search for an object with a checked context-sensitive menu. Boolean property. |
VISIBLE_MENU | Search for an object with a visible context-sensitive menu. Boolean property. |
DEFAULT_MENU | Search for an object with a default context-sensitive menu. Boolean property. |
The following operators are available:
Operator | Scope |
---|---|
= | Tests if the values are equal. Applies to alphanumeric, numeric or Boolean properties. For alphanumeric properties, the case sensitivity modifier can apply. |
<> | Tests if the values are different. Applies to alphanumeric, numeric or Boolean properties. For alphanumeric properties, the case sensitivity modifier can apply. |
> | Tests if the property value is higher than the specified value. Applies to alphanumeric or numeric properties. For alphanumeric properties, the case sensitivity modifier can apply. |
>= | Tests if the property value is higher than or equal to the specified value. Applies to alphanumeric or numeric properties. For alphanumeric properties, the case sensitivity modifier can apply. |
< | Tests if the property value is lower than the specified value. Applies to alphanumeric or numeric properties. For alphanumeric properties, the case sensitivity modifier can apply. |
<= | Tests if the property value is lower than or equal to the specified value. Applies to alphanumeric or numeric properties. For alphanumeric properties, the case sensitivity modifier can apply. |
CONTAINS | Tests if the property value contains the specified value. Only applies to alphanumeric properties. For alphanumeric properties, the case sensitivity and whole word search modifiers may apply. |
MATCHES | Tests if the property value matches the specified filter (simple search filter with replacement characters, where "*" indicates any sub-expression and "?" indicates any character). Only applies to alphanumeric properties. For alphanumeric properties, the case sensitivity and whole word search modifiers may apply. |
EXISTS | Tests if the property exists for the object, regardless of its value. |
Examples:
TAB_STOP = TRUE selects all objects with a TAB_STOP property set to TRUE.
TAB_STOP EXISTS selects all objects with a TAB_STOP property regardless of their value.
OBJECT_NAME = OUTPUT_FIELD & WIDTH > 45 selects the output fields with a width of over 45 pixels. ↑ Top of page