HTBasic Help
×
Menu
Index

CONTROL

Sets the value(s) of specified attribute(s) for the specified widget
 

Example

CONTROL @Strip2;SET ("CURRENT AXIS":"X", RANGE":20)
CONTROL @Slider;SET ("VALUE":Setpoint)
 

Syntax

 
CONTROL @w_hndl; SET ( set_atr_list )
  set_atr_list =  { sstr_exp: { num_exp | str_exp } | mstr_exp:{num_ary | str_ary} | atr_ary(*):{num_ary | str_ary}(*) } [, ...]
 
Item
 Description
 Range *depends on
atr_ary
single-valued array attributes: accompanying
num_ary or str_ary must have identical dimensions
*widget
num_ary
numeric array of attribute values
*attribute(s)
num_exp
numeric expression attribute value
*attribute
sstr_exp
single-valued string expression attribute
*widget
str_ary
string array of attribute values
*attribute(s)
str_exp
string expression containing attribute value
*attribute
mstr_exp
multi-valued string expression of attribute values
*widget
w_hndl
widget handle name (string expression)
any valid name
w_type
widget type string expression
 

Description

CONTROL sets attributes of widgets previously created with ASSIGN. Attributes are either scalar (may contain a single value) or vector (may be assigned an array of values) and have values of either numeric or string type. You can use a shorthand method to assign values to several scalar attributes at once in one string array and all the matching values in another array of the same size. Then you specify both array names in the SET option of the ASSIGN statement (elements of the string array that contain nothing will be ignored). For example:
 
Attribs$(1) = "X"
Attribs$(2) = "Y"
Attribs$(3) = "WIDTH"
Attribs$(4) = "HEIGHT"
Values(1) = 5
Values(2) = 5>
Values(3) = 500
Values(4) = 300
 
CONTROL @Panel;SET (Attribs$(*):Values(*))