This is a Read/Write Property.

Important! Use this property to prevent "flicker/flash/jumping" of controls and to speed up execution of the script. Adjustments to Graphical components are far slower then any other calculation by a massive factor. One side effect is causing the display area of other controls to re-render it's painted surface.

Sets/Gets a controls LEFT property in the Questionnaire (location in the parent container panel).

This property is the prefered means to set the location of GUI controls in the questionnaire during script execution.

Parameters

control (string/object) - the name of the control to access or the object reference to a control previously retrieved with the "C.Item(name)" property (access via a control requires the control reference to be a visible control, a table would cause an error)

Return Value

integer - representing the current value of the controls property.

Remarks

This property is the most efficient manner of setting location values to controls during code execution.

The property itself reads the underlying control property on demand, and stores it in a buffer. Second, Third and Subsequent reads of the property take the value from the buffer.

When the value is written, the buffer is written to (not the actual control).

After the entire script is executed the buffer values are written to the underlying controls in one step, only if they are changed, and only once!

Examples

Example Usage of the C.Left Property

C.Left("Label1")= -300
C.Left("Label2")= -300        ' set everything to a default to simplify logic
C.Left("Label3")= -300        ' assigned to a buffer, controls property value does not change yet

if Q("Option")="1" then
C.Left("Label1")=100       ' set one label to be at some location for a specific case.
elseif Q("Option")="2" then
C.Left("Label2")=120
elseif Q("Option")="3" then
C.Left("Label3")=140
end if
' after the end of ALL scripts the system now sets the resulting properties but only if they changed!

Equivalent code that causes FLASHING in the execution of the questionnaire (do not do this!)

C("Label1").Left= -300         ' this is a bad idea do not use this structure!
C("Label2").Left= -300        ' set everything to a default to simplify logic
C("Label3").Left= -300        ' assigned to the control directly! control now disapears!

if Q("Option")="1" then
C("Label1").Left=100       ' set one label to be displayed for a specific case.
elseif Q("Option")="2" then
C("Label2").Left=120       ' control now reappears in the GUI causing a Flash!
elseif Q("Option")="3" then
C("Label3").Left=140
end if