SftMask/OCX 6.5

SftMask.Text Property

Softel vdm, Inc.

Defines the control contents.

Syntax       

Get

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;
_bstr_t String = object->GetText();

C

HRESULT object->get_Text(BSTR* String);

Delphi

String := object.Text   : WideString;

Put

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;
void object->PutText(_bstr_t 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

Contents.DateTime

=Now

Today's date and the current time

Contents.DateTime

=Yesterday

Yesterday's date and the current time

Contents.DateTime

=Tomorrow

Tomorrow's date and the current time

Contents.DateTime

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)

ClipMode

TextDisplay

Space

ClipMode

TextDisplayNoLiterals

Space

No

TextDisplayWithLiterals

Space

Yes

TextPureNoLiterals

Chr(13)

No

TextPureWithLiterals

Chr(13)

Yes

See Also  SftMask Object | Object Hierarchy


Feedback / comments / error reports for this topic
© 2000, 2008 - Softel vdm, Inc. - www.softelvdm.com