The changeobject statement modifies the properties of one object in a form.
This statement has three parameters:
object – specifies the object to be modified. The object does not have to be selected. A text value specifies the object by name (see Object Names). A numeric value specifies the object by ID number.
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.
This statement modifies a single object in a form, which can be specified by name (if it has one) or by the object ID number. For example, this code will make the Photo Border object one inch taller and wider.
changeobject "Photo Border","rectangle",rectangleadjust(objectinfo("rectangle"),0, 0, 72, 72)
Note: You can specify multiple property/value pairs in a single changeobject statement, like this:
For example, this procedure makes the clicked object semi-transparent red.
You can also specify the properties with a dictionary, as shown below:
The two previous example perform the exact same modification to the clicked object. 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 changeobject statement, which modifies a single object without selecting it, with the changeobjects statement, which modifies one or more selected objects.
- activeobjectaction -- allows a procedure to communicate with the object on the current form that is currently being edited (if any).
- changeobjects -- modifies the properties of one or more objects in a form.
- cloneform -- copies all of the objects in a form (optionally, with modifications) into the active form.
- cloneobjects -- duplicates objects in a form (with modifications).
- closeactiveobject -- closes any object whose text is currently being edited.
- datamode -- switches a form from graphics mode into data mode.
- deleteselectedobjects -- deletes selected objects from a form.
- draggraybox -- facilitates dragging something around in a form window.
- dragtext -- starts drag-and-drop of text.
- formcleanview -- cleans up extraneous NSView objects in the current form.
- formxy -- programmatically scrolls a form to a new position.
- graphicsmode -- switches a form into graphics mode.
- info("activeobject") -- returns the name of the currently active text editor or word processor object (if any).
- info("activesuperobject") -- returns the name of the currently active text editor or word processor object, if any.
- info("click") -- returns the location of the last mouse click in screen relative co-ordinates.
- info("clickedobjectid") -- returns the object ID of the clicked object.
- info("focusobject") -- returns the name of the currently active text editor or word processor object, if any.
- info("focusobjectid") -- returns the object ID of the currently active text editor or word processor object, if any.
- info("scrollpoint") -- returns the distance the current form is scrolled horizontally and vertically.
- magicformwindow -- designates an open window as the temporary active window for the purposes of info( functions and graphic statements.
- magicwindow -- designates an open window as the temporary active window for the purposes of info( functions and graphic statements.
- magnification -- changes the magnification of a form.
- Modifiable Object Properties -- describes the properties of graphic objects that can be modified by a program (dimensions, color, font, title, etc.).
- newformobject -- creates a new graphic object in a form.
- object -- selects an object (based on the object name).
- objectaction -- allows a procedure to communicate with an object on the current form.
- objectid -- selects one graphic object in the current form based on an ID number.
- objectinfo( -- returns information about a graphic object: its location, size, color, font, etc.
- objectinfoarray( -- builds a text array of form object properties
- objectnumber -- identifies one graphic object from a set of selected graphic objects in the current form.
- progressalert -- displays a progress alert if an operation is going to take a long time.
- progressbar -- updates a progress bar on the current form.
- selectallobjects -- selects all the graphic objects in the current form.
- selectnoobjects -- unselects all the graphic objects in the current form.
- selectobjects -- uses a formula to select one or more objects in the current form.
- startgraphicschange -- adds undo support to a procedure.
- textlisttableoptions -- sets up text list table options
- xytoxy( -- converts a point or rectangle from one co-ordinate system to another.
|10.0||Updated||New in this version.|