HeaderPane
Main
Hide
Share Link
Print

Text Property, SftMask Object

Defines the control contents.

Syntax

Get

C#string String = object.Text;
VB.NETString = object.Text As String
C++_bstr_t String = object->Text;
_bstr_t String = object->GetText();
CHRESULT object->get_Text(BSTR* String);

Put

C#string object.Text = String;
VB.NETobject.Text = String As String
C++_bstr_t object->Text = String;
void object->PutText(_bstr_t String);
CHRESULT object->put_Text(BSTR String);

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:

SymbolValue UsedAssigned To
=TodayToday's date and the current timeContents.DateTime
=NowToday's date and the current timeContents.DateTime
=YesterdayYesterday's date and the current timeContents.DateTime
=TomorrowTomorrow's date and the current timeContents.DateTime

Symbols are not 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.

PropertyUnspecified PositionsLiterals
TextChr(13)ClipMode
TextDisplaySpaceClipMode
TextDisplayNoLiteralsSpaceNo
TextDisplayWithLiteralsSpaceYes
TextPureNoLiteralsChr(13)No
TextPureWithLiteralsChr(13)Yes

See Also SftMask Object | Object Hierarchy


Last Updated 11/15/2026 - (email)
© 2026 Softel vdm, Inc.