changeobjects
PROPERTY
,
VALUE

The changeobjects statement modifies the properties of one or more objects in a form.


Parameters

This statement has two parameters:

property – the object property (color, font, etc.) to modify. See Modifiable Object Properties for descriptions of the different properties that can be modified. Standard properties can be specified in either upper or lower case, but native properties are case sensitive.

value – The new value for this property. Note: Instead of specifying the property names and values as separate parameters, you can specify multiple properties with a dictionary. See the main text below for more information.


Description

This statement modifies selected objects in a form. Usually a procedure will use the SelectObjects statement to select the objects before modifying them. For example, this procedure selects all objects in a form, then moves them all down by 1 inch (perhaps in preparation for adding new objects at the top).

selectallobjects
changeobjects "rectangle",rectangleoffset(objectinfo("rectangle"),72,0)
selectnoobjects

It is possible to move objects beyond the right-hand and lower window boundaries but they cannot be moved beyond the left-hand or upper window boundaries with this statement, with the MoveObjects statement or manually in Graphics Mode. If you move multiple objects towards the left-hand or upper window boundaries, objects will move only if there is room to do so. This means that, in some cases, some objects will move while others remain in place, thus changing the relationship between individual object positions. You may not want this to happen.

You can specify multiple property/value pairs in a single changeobjects statement, like this:

changeobjects property1,value1,property2,value2,property3,value3

For example, this procedure makes all selected objects semi-transparent red.

changeobjects "color",rgb(65535,0,0),"opacity",50

You can also specify the properties with a dictionary, as shown below:

changeobjects info("clickedobjectid"),
    initializedictionary(
        "color",rgb(65535,0,0),
        "opacity",50)

The two previous example perform the exact same modification to the selected objects. The advantage of using a dictionary is that you can prepare it in advance in a variable, and then use it over and over again (possibly adjusting it with the changedictionaryvalues( function).

There are literally hundreds of different object properties that can be modified with the changeobjects statement. To learn more, see Modifiable Object Properties.

Note: Don’t confuse the changeobjects statement, which modifies all selected objects, with the changeobject statement, which modifies a single object without needing to select it.


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but with substantial changes to list of supported properties. The changeobjects statement also now allows you to provide multiple property/value pairs (previous versions of Panorama could only change one property at a time.