Dynamically Manipulating Controls at Run Time

How to:

You manipulate controls at run time using the Winform command. For more information, see How to Determine the Value of a Control Property and How to Set the Value of a Control Property.


Top of page

x
Syntax: How to Determine the Value of a Control Property

To determine the value of a control property and assign it to a variable, use the following syntax

Winform Get form.control.property INTO variable [;]

or

variable = form.control.property ;

where:

form

Is the name of the form, determined by the (Name) property.

control

Is the name of the control, determined by the (Name) property.

property

Is the name of the property.


Top of page

x
Syntax: How to Set the Value of a Control Property

To set the value of a control property (except for colors), use the following syntax

[Winform Show_Inactive form;]
Winform Set form.control.property TO setting [;]

or

[Winform Show_Inactive form;]form.control.property = setting ;

where:

Winform Show_Inactive

Is required if the form is not the active form.

form

Is the name of the form, determined by the (Name) property.

control

Is the name of the control, determined by the (Name) property.

property

Is the name of the property.

Not all properties can be set dynamically. To see which properties you can set, see Form and Control Properties Reference.

Tip: You can easily generate the Winform Set syntax by selecting the property in the property sheet and dragging it to the Procedure Editor or the Event Handler editor. If you cannot drag the property into the Procedure Editor or the Event Handler editor, then the property is not dynamically "settable."

For more information on how to set color properties, see Defining Colors for Your Form and Controls.


WebFOCUS