SftMask/OCX 6.5

SftMask.SelText Property

Softel vdm, Inc.

Defines the selected text.

Syntax       

Get

VB.NET

String = object.SelText  As String

VB

String = object.SelText  As String

C#.NET

string String = object.SelText;

VC++

_bstr_t String = object->SelText;
_bstr_t String = object->GetSelText();

C

HRESULT object->get_SelText(BSTR* String);

Delphi

String := object.SelText   : WideString;

Put

VB.NET

object.SelText = String  As String

VB

object.SelText = String  As String

C#.NET

string object.SelText = String;

VC++

_bstr_t object->SelText = String;
void object->PutSelText(_bstr_t String);

C

HRESULT object->put_SelText(BSTR String);

Delphi

object.SelText := String   : WideString;

object

A SftMask object.

String

Defines the selected text.

Comments

The SelText property defines the selected text.

The SelText property describes the currently selected text, including any literals based on the ClipMode property. When retrieving the SelText property, the selected text is returned including all literals, as it is displayed.

When setting the SelText property, the specified Text replaces the currently selected text. Based on the ClipMode property, literals may be present. In any case, if characters in the new string Text are not acceptable based on the defined input mask (see Mask property), they are simply ignored. Languages that provide the HRESULT value can test for S_OK (the function was successful), S_FALSE (at least one character was ignored) or an error return value.

When retrieving or setting the SelText 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.


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