HTBasic Help
×
Menu
Index

Querying Widget Attributes

 
After you have created a widget with an ASSIGN command, you can use the STATUS
command to query the values of the widget attributes. The STATUS command syntax is:
 
  STATUS @widget handle;RETURN (return attribute list)
 
Since attribute values may be changed by the user or by some sequence of events,
to ensure correct operation of your program, you may want to query the widget for the
current value of an attribute before using it in your program.
 
Returning Attribute Values
 
There are three ways to query and return attribute values using the STATUS command:
 
·
You can return one attribute value with a single STATUS statement. For example:
 
        STATUS @Meter;RETURN ("VALUE":Meterval)
 
·
 You can also return multiple attribute values with multiple STATUS statements.
     
For example:
 
       STATUS @Bars;RETURN ("BACKGROUND":Barsbackgnd)
       STATUS @Bars;RETURN ("SHOW LIMITS":Status)
       STATUS @Bars;RETURN ("VALUE":Bar1val)
 
·
You can also return multiple attribute values with a single STATUS statement. For example:
 
       STATUS @Bars;RETURN ("BACKGROUND":Barsbackgnd,"SHOW LIMITS":Status,
      "VALUE":Bar1val)