SUI_AddFormVariable Table of Contents || Prev | Next || [?]

 
SUI_AddFormVariable (formType; varName; varLabel; model{; formPage{; miscInfo{; labelObject}}})
 
ParameterTypeDescription
formTypeInteger1 = input; 2 = dialog
varNameStringVariable name
varLabelStringVariable label
modelLongintlanguage model code
formPageIntegerForm page, if automatic goto page is desired
miscInfoStringMisc information (see description)
labelObjectStringObject name of variable's label
 
Description

SUI_AddFormVariable allows you to voice-enable a variable on input or dialog form. When the label is spoken, the variable will take focus, and the specified language model will be set.

Example 1

On the input form for [Orders] you have a radio button group for order status. To voice-enable these radio buttons, you call SUI_AddFormVariable in the input form method for each button:


SUI_AddFormVariable (1;"rb_pending";"Status is Pending";SUI Radio Button)
SUI_AddFormVariable (1;"rb_shipped";"Status is Shipped";SUI Radio Button)
SUI_AddFormVariable (1;"rb_cancelled";"Status is Cancelled";SUI Radio Button)

When one of the button labels is spoken, SUI Pack will set that button to 1, and all others in the same group to 0. Note that in this example, a design decision was made by the developer to involve the group name in the voicing of all radio buttons ("Status is...").

Example 2

To voice-enable a checkbox:

SUI_AddFormVariable (1;"cb_Complete";"Complete";SUI Checkbox)

SUI Pack requires that you first say "check" or "uncheck" and the checkbox label, e.g. "Check Complete".

To disable the voicing of a variable, use SUI_RemFormObject.

New in v3.0.0

You can now specify the object name of the variable's label text object as the 7th parameter, so that when this object takes voice focus, the label can change. The default is for the label to become underlined.