selectobjects
FORMULA

The selectobjects statement uses a formula to select one or more objects in the current form.


Parameters

This statement has one parameter:

formula – is a Boolean formula that specifies which objects in the current form will be selected.


Description

The selectobjects statement uses a formula to select one or more objects in the current form. The statement scans the form object by object. For each object it checks the formula to see if the result is true or false. If the result is true, the object is selected, otherwise it is not selected.

In order to make a true-false decision about a graphic object, the formula needs to be able to get information about the object. This is done with the objectinfo( function. This function can return any object property you want, including the location, size, name, font, text size, color, and more. Within the formula you can compare these attributes with the attributes you are looking for to decide which objects should be selected.

This example will select all objects with top edges within the top 2 inches (144 points) of the current form.

selectobjects rtop( objectinfo("rectangle"))<144

This example will select all objects that contain 9 point Monaco text.

selectobjects objectinfo("font") match "Monaco" and objectinfo("textsize")=9

This example will select all rectangle objects on a form.

selectobjects objectinfo("class") contains "rectangle"

(For a complete list of object types use the objectinfo(“classnames”) function, or see the Object Library in the bottom right of any graphics mode form window.)


See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.