Syntax 2: For EditMask controls
Description
Gets the unformatted text from an EditMask control.
Applies to
EditMask controls
Syntax
|
1 |
editmaskname.GetData ( datavariable ) |
|
Argument |
Description |
|---|---|
|
editmaskname |
The name of the EditMask control containing the |
|
datavariable |
A variable to which GetData will assign the unformatted |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, GetData returns null.
Usage
You can find out the datatype of an EditMask control by looking at
its MaskDataType property, which holds a value of the MaskDataType
enumerated datatype.
Examples
This example gets data of datatype date from the EditMask control
em_date. Formatting characters for the date are ignored. The String
function converts the date to a string so it can be assigned to the
SingleLineEdit sle_date:
|
1 2 3 |
date d em_date.GetData(d) sle_date.Text = String(d, "mm-dd-yy") |
This example gets string data from the EditMask control em_string
and assigns the result to sle_string. Characters in the edit mask are
ignored:
|
1 2 3 |
string s em_string.GetData(s) sle_string.Text = s |