Sybase 2 Barcode Reader User Manual


 
Defining edit styles
248 DataWindow .NET
Using spin controls
You can define an edit mask as a spin control, a box that contains up and down
arrows that users can click to cycle through fixed values. For example, you can
set up a code table that provides the valid entries in a column; users simply
click an arrow to select an entry. Used this way, a spin control works like a
drop-down list that displays one value at a time:
For more about code tables, see “Defining a code table” on page 251.
To use an EditMask edit style:
1 Select EditMask in the Style Type box if it is not already selected.
2 Define the mask in the Mask box. Click the special characters in the
pop-up menu to use them in the mask. To display the pop-up menu, click
the button to the right of the Mask box.
3 Specify other properties for the edit mask.
When you use your EditMask, check its appearance and behavior. If
characters do not appear as you expect, you might want to change the font
size or the size of the EditMask.
Using a drop-down
calendar
You can use a drop-down calendar option on any DataWindow column with an
EditMask edit style and a Date, DateTime, or TimeStamp datatype. The
DDCalendar EditMask property option allows for separate selections of the
calendar month, year, and date. This option can be set in a check box on the
Edit page of the DataWindow painter Properties view when a column with the
EditMask edit style is selected. It can also be set in code, as in this example for
the
birth_date column:
dw_1.Modify("birth_date.EditMask.DDCalendar=’Yes’")
If you do not include script for client formatting in a Web DataWindow, the
drop-down calendar uses a default edit mask to display the column data based
on the client computer’s default localization settings. To make sure that dates
selected with the drop-down calendar option are displayed with the desired edit
mask, specify that the Client Formatting option be included with the static
JavaScript generated and deployed for the DataWindow.