The value property accesses the value of the control for the current row, and can be used to access or update the value. ctrl.value is equivalent to ctrl.getValue(ctrl.getBlock().getQueryRow()) or ctrl.setValue(ctrl.getBlock().getQueryRow(), value) for access or update respectively. It can only be used to access the current row.
void setValue ( number rowNum, string value )Update value in control
Set the value of a control. The row number does not count displayed rows, rather the row number in the query. Use the block method getQueryRow() to retrieve the current row number. The value for the current row can be accessed directly using the value property described above.
string getValue ( number rowNum )Get value from control
Fetches the control value for a specified (query) row number. The value for the current row can be accessed directly using the value property described above. If the specified row is not visible, returns an empty value.
void clearValue ( number rowNum )Clear control value
Clears the control value for a specified (query) row number; in effect this sets the value to null. If the specified row is not visible, the call has no effect.
string getRowValue ( number rowNum )Get value from underlying query
This is similar to getValue, but the value is returned from the underlying query. Values may be retrieved from any row (not only those for visible records), but may differ from the displayed value if the user has changed but not saved a value.
void setTabOrder ( number order )Set control tab ordering
void setEnabled ( number rowNum, bool enable )
Enable or disable control
void setVisible ( number rowNum, bool show )
Show or hide control
bool isEnabled ( number rowNum )
Test if control is enabled
bool isVisible ( number rowNum )
Test if control is visible
bool isValid ( number rowNum )
Test if control contents are valid
string errorText ( )
Get the error text for the control
The error text for a data control can be set in the properties for the control. If it not set then text based on the control and and expression is used.
void setFGColor ( number rowNum, string color )Set control foreground color
Sets the foreground colour of the control corresponding to the specified row. Note that colour settings do not scroll along with the data values.
void setBGColor ( number rowNum, string color )Set control background color
Sets the background colour of the control corresponding to the specified row. Note that colour settings do not scroll along with the data values.
void setFont ( number rowNum, string font )Set control font
Sets the font of the control corresponding to the specified row. Fonts are described as can be seen in the propery dialogs family;size;weight;italic; eg., Arial;10;75;1 is 10-point bold-italic Arial. Note that font settings do not scroll along with the data values.
void setValueFromQuery ( string query, list args, number rowNum )Set value from a query
The query is executed, and the first value from the first returned record is loaded into the control. If the row number is not given, then the current query row is used.
void setReadOnly ( number rowNum, bool readonly, string fgcolor, string bgcolor )Set read-only state and colours
The read-only state of the control for the specified row is explicitely set, overriding the readonly property. Optionally, the foreground and backgound colours can be set, with colours specified like #C0FFFF. If this method is applied to a block, then it is applied to all controls within that block (and nested containers, but not nested blocks).
isReadOnly ( number rowNum )Test if control is read-only
Returns a true result if the specified control is currently read-only.