Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

SelStart Property, SftMask Object

Defines the start of the selected text.

Syntax

Get

VB.NETStart = object.SelStart As Integer
VBStart = object.SelStart As Long
C#.NETint Start = object.SelStart;
VC++long Start = object->SelStart;
long Start = object->GetSelStart();
CHRESULT object->get_SelStart(long* Start);

Put

VB.NETobject.SelStart = Start As Integer
VBobject.SelStart = Start As Long
C#.NETint object.SelStart = Start;
VC++long object->SelStart = Start;
void object->PutSelStart(long Start);
CHRESULT object->put_SelStart(long Start);

object

A SftMask object.

Start

Defines the start of the selected text. This is the location where the selection begins and is also the insertion point.

Comments

The SelStart property defines the start of the selected text.

The selected text or current selection always starts at the index defined by the SelStart property which is also the caret location or insertion point.

The selection extends from the position defined by SelStart towards the end of the text if SelLength is a positive value. If SelLength is a negative value, the selection extends from the position defined by SelStart towards the beginning of the text.

The OptimalPosition method can be used to insure that the insertion point is at a suitable location for data entry.

Examples

VB6

Option Explicit

Private Sub Command1_Click()
    End
End Sub

Private Sub Form_Load()
    SftMaskPhone.Text = "9415058600" ' our phone number
    SftMaskPhone.SelStart = 1  ' set the input location
    SftMaskSSN.Text = "444-12-1111" ' a social security number
    SftMaskToday.Contents.DateTime = Date ' set today's date
    SftMaskTime.Contents.DateTime = Time
    SftMaskPercent.Contents.Value(0) = 50 ' start with 50 percent
    SftMaskAmount.Text = 199
    SftMaskIPAddr.Text = "209.61.201.49"
End Sub

C++

    _ASSERT(m_vSftMaskAmount != NULL);
    m_vSftMaskIPAddr = GetDlgItem(IDC_SFTMASKIPADDR)->GetControlUnknown();
    _ASSERT(m_vSftMaskIPAddr != NULL);
    m_vSftMaskPswd = GetDlgItem(IDC_SFTMASKPSWD)->GetControlUnknown();
    _ASSERT(m_vSftMaskPswd != NULL);

    // phone number
    m_vSftMaskPhone->Text = _bstr_t(_T("9415058600"));
    m_vSftMaskPhone->SelStart = 1;

    // social security number
    m_vSftMaskSSN->Text = _bstr_t(_T("444-12-1111"));

    // today's date
    m_vSftMaskTodaysDate->Contents->DateTime = COleDateTime::GetCurrentTime();;

See Also SftMask Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.