UseCodeTable
property for PowerScript controls
Applies to
EditMask controls
Description
When an EditMask control has been defined as a spin control (that
is, a control with up and down arrows the user clicks to cycle through
predefined values), a code table can be used to validate data.
The UseCodeTable property specifies whether the control uses a code
table to validate data.
Usage
In a painter
To specify use of a code table for an EditMask control:
-
Select the Spin Control and Code Table check boxes on the Mask
tab page of the control’s Properties view.An area appears on the lower half of the tab page where you can
enter values for the code table. -
Specify Display Values and their corresponding Data
Values.Use the Insert button to insert items within this list.
In scripts
The UseCodeTable property takes a boolean value. This example
specifies that the EditMask control should use its code table to validate
data:
|
1 |
em_1.UseCodeTable = TRUE |
You can specify the contents of the code table in scripts by using
the DisplayData property. Enter the Display values and their corresponding
Data values as a text string, with the Display and Data pairs separated by
tabs and the pairs separated by slashes. For example:
|
1 |
em_1.DisplayData = "Black 1/White 2/Red 3" |