Syntax 2 For EditMask controls
Description
Gets the unformatted text from an EditMask control.
Controls
EditMask controls
Syntax
|
1 |
<span>editmaskname</span>.<span>GetData</span> ( <span>datavariable</span> ) |
|
Argument |
Description |
|---|---|
|
editmaskname |
The name of the EditMask control containing |
|
datavariable |
A variable to which GetData will |
Return Values
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 |
date d |
|
1 |
em_date.<span>GetData</span>(d) |
|
1 |
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 |
string s |
|
1 |
em_string.<span>GetData</span>(s) |
|
1 |
sle_string.Text = s |