Sybase 2 Barcode Reader User Manual


 
Defining edit styles
244 DataWindow .NET
In the preceding example, when users see the value Business Services, the
corresponding data value could be 200.
To use the DropDownListBox edit style:
1 Select DropDownListBox from the Style Type box.
2 Select the appropriate properties.
3 Enter the value you want to have appear in the Display Value box and the
corresponding data value in the Data Value box.
At runtime
You can define and modify a code table for a column in code by using the
SetCodeTableValue method at runtime. To obtain the value of a column at
runtime, use the
GetCodeTableValue method. To clear the code table of values,
use the
ResetCodeTable method.
For more about code tables, see “Defining a code table” on page 251.
The CheckBox edit style
If a column can take only one of two (or perhaps three) values, you might want
to display the column as a check box; users can select or clear the check box to
specify a value. In the following entry from a DataWindow object, users can
simply check or clear a box to indicate whether an employee has health
insurance:
To use the CheckBox edit style:
1 In the Text box, enter the text you want displayed next to the check box.
Using accelerator keys
If the CheckBox has an accelerator key, enter an ampersand (&) before the
letter in the text that represents the accelerator key.
2 In the Data Value For boxes, enter the values you want put in the
DataWindow buffer when the CheckBox is checked (on) or unchecked
(off).
If you selected the 3 States box, an optional third state box (other) appears,
for the case when the condition is neither on nor off.