Equinox Online Help - Language Reference - A to Z

Home

Set

Applies to
SyntaxSet PropertyName, ObjectExpression, SetItem
Action[Statement] Sets the specified property for an object on a form, during data entry mode.
ScopeOnly usable in form methods.
Notes

This statement sets a specified property for an object. eg You could change the foreground colour of one or more objects. The argument ObjectExpression contains the object name as a string. If supplied as a constant, it must be in quotation marks. Object names are assigned to objects in the Property dialog of the form editor.

The PropertyName argument specifies the property to be set. The supplied value for the property is SetItem. This may be a constant, variable, workarea or field.

The properties of all objects whose names match ObjectExpression are set to the value in SetItem.

Note that when you leave data entry mode, all properties revert to their original values.

The system workarea SysError is set to a non-zero value if an error occurs, otherwise zero.

CategoryForms
See Also ChangeEditLine, ChangeGroup, ChangeObject, ChangePage, CurrentEventName, CurrentGroupName, CurrentObjectName, CurrentPageName, DefaultHelp, EnableGroup, EnablePage, Get, IsPageScroll, NextObjectName, SetDefaultHelp, SetEquinoxTitle, SetPageScroll, SetPageTitle, ShowPage
Example

In the following example, a form has a button which the operator can use to both edit and save records. The function of the button changes, depending on the value of the SysMode workarea. This method (attached to the button) changes its text accordingly.

if SysMode = InsertMode,EditMode then
Set text, "SaveEditButton", "Save"
else
Set text, "SaveEditButton", "Edit"
end if

The next method (attached to an On Display event) changes the colour of a field to red, if its value becomes negative.

if AccTotal < 0 then
Set foreground, "AccountTotal", red
else
Set foreground, "AccountTotal", black
end if