MSM-Workstation
Macros

Go back to the alphabetic list of macros
Go back to the first page of this tutorial

%%Prop ( ObjectProperty )

Return the value of the property of an object.

ObjectProperty An object and property specification. Window and Control default to the current window and control. The property name, if omitted, defaults depending on the object type.

Default Properties

The default property of an object is determined by the following rule:

ComponentDefault Property
ButtonTitle
Check BoxValue
Combo BoxValue
DateValue
DocumentValue
Drop Combo BoxValue
Drop DownValue
GenericTitle
Group BoxTitle
LabelTitle
List BoxValue
Long ListValue
PicturePicture
Radio ButtonValue
Scroll BarValue
Spin ButtonValue
SQL DataNone
Tabbed GroupNone
Text BoxValue
TimerNone
WindowTitle

The code generated by the macro %%Prop behaves like an extrinsic function in M[UMPS], returning the value of the Property of the Object.

The specified Property may not be multiple-valued.

For fetching a property into a variable, consider using the %%Get command.

Note that when manipulating the value of certain properties using the Property Bar, symbolic names such as "Yes" and "No" are used. However when manipulating the value using macros, the underlying internal values must be used. These are given on the status-bar message when using the Value dropdown on the Property Bar. In the case of "Yes" and "No" the internal values are 1 and 0 respectively.

Examples

I %%Prop(List1.Active) ...
The IF command succeeds if the control called "List1" on the current window is active.

Q:%%Prop(Drinks.)=""
Quit if the value of the control called "Drinks" has an empty value.

%%Set(BackColor,%%Prop(..Color))
Set the background color of the current control equal to the background color of the current window.

See also

%%Get, %%GetChoice, %%GetSel, %%Prop, %%Reset, %%ResetChoice, %%ResetSel/a>, %%Set, %%SetChoice and %%SetSel.