|
|
|
SftMask.Text Property |
Defines the control contents.
Syntax
VB.NET |
String = object.Text As String |
||
VB |
String = object.Text As String |
||
C#.NET |
string String = object.Text; |
||
VC++ |
_bstr_t String = object->Text;
|
||
C |
HRESULT object->get_Text(BSTR* String); |
||
Delphi |
String := object.Text : WideString; |
||
VB.NET |
object.Text = String As String |
||
VB |
object.Text = String As String |
||
C#.NET |
string object.Text = String; |
||
VC++ |
_bstr_t object->Text = String;
|
||
C |
HRESULT object->put_Text(BSTR String); |
||
Delphi |
object.Text := String : WideString; |
object
A SftMask object.
String
Defines the control contents. A simple string or special symbolic values can be used. Symbols start with the = sign.
Comments
The Text property defines the control contents.
The DefaultText property can be used to define a default value for the Text property, when the Text property becomes empty.
When retrieving or setting the Text property in a Masked Edit control (with Mask), input positions without data are represented by the carriage return (Chr(13)) character. This allows the distinction between unspecified data and specified (but blank) data fields. A simple edit control (without Mask) does not have unspecified positions and never uses the carriage return place holder. The otherwise equivalent TextDisplay property returns space characters instead.
The ClipMode property affects the handling of literal characters.
It is possible to retrieve portions of the control contents using the Contents.Value property.
When assigning a string to the Text property, the following special symbolic values are allowed, which are replaced by their actual values:
Symbol |
Value Used |
Assigned To |
=Today |
Today's date and the current time |
|
=Now |
Today's date and the current time |
|
=Yesterday |
Yesterday's date and the current time |
|
=Tomorrow |
Tomorrow's date and the current time |
Symbols are case sensitive and the leading = sign is required. When using symbolic values, no other characters can appear in the specified String argument.
The properties TextDisplay, TextDisplayWithLiterals, TextDisplayNoLiterals, TextPureWithLiterals and TextPureNoLiterals also retrieve the control contents with varying handling of unspecified input positions and literal characters.
Property |
Unspecified Positions |
Literals |
Text |
Chr(13) |
|
Space |
||
Space |
No |
|
Space |
Yes |
|
Chr(13) |
No |
|
Chr(13) |
Yes |
See Also SftMask Object | Object Hierarchy