Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

Mode Property, SftMaskAutoComplete Object

Defines the autocomplete behavior.

Syntax

Get

VB.NETStyle = object.Mode As SftMaskAutoCompleteModeConstants
VBStyle = object.Mode As SftMaskAutoCompleteModeConstants
C#.NETSftMaskAutoCompleteModeConstants Style = object.Mode;
VC++enum SftMaskAutoCompleteModeConstants Style = object->Mode;
enum SftMaskAutoCompleteModeConstants Style = object->GetMode();
CHRESULT object->get_Mode(enum SftMaskAutoCompleteModeConstants* Style);

Put

VB.NETobject.Mode = Style As SftMaskAutoCompleteModeConstants
VBobject.Mode = Style As SftMaskAutoCompleteModeConstants
C#.NETSftMaskAutoCompleteModeConstants object.Mode = Style;
VC++enum SftMaskAutoCompleteModeConstants object->Mode = Style;
void object->PutMode(enum SftMaskAutoCompleteModeConstants Style);
CHRESULT object->put_Mode(enum SftMaskAutoCompleteModeConstants Style);

object

A SftMaskAutoComplete object.

Style

Defines the autocomplete behavior.

StyleValueDescription
autocompleteSftMaskNone0The autocomplete feature is not available.
autocompleteSftMaskSuggest1As data is entered, the control searches the list of saved entries and displays matching entries as a list below the control.
autocompleteSftMaskAppend2As data is entered, the control searches the list of saved entries and displays the remainder of the first matching item beyond the insertion point.
autocompleteSftMaskSuggestAppend3Combines autocompleteSftMaskSuggest and autocompleteSftMaskAppend by displaying both the list below the control and the remainder of the first matching item.

Comments

The Mode property defines the autocomplete behavior.

Saved autocomplete entries are stored in the file defined by the AutoComplete.File property.

The modes autocompleteSftMaskSuggest and autocompleteSftMaskSuggestAppend display a list of matching entries below the control. If no matching items are found, the list is not displayed. If the user selects an entry from the displayed list, the MatchAccept (or MatchCustom) event occurs.

Mode autocompleteSftMaskSuggest allows the addition of custom entries using the AutoComplete.AddTop and AutoComplete.AddBottom methods while handling the MatchAddCustomItems event. Other modes do not support custom entries. If the user selects and accepts a custom entry, the MatchCustom event occurs.

Examples

VB.NET

    AxSftMask1.Mask = "#####"
    AxSftMask1.EntrySelect = SftMaskEntrySelectConstants.entrySftMaskSelectEndHome

    AutoCompleteObj.File = "-\Softelvdm\AutoComplete\SampleFile2.Suggest"
    AutoCompleteObj.Encrypt = False
    AutoCompleteObj.IgnoreCase = True
    AutoCompleteObj.MaxEntries = 50
    AutoCompleteObj.Mode = SftMaskAutoCompleteModeConstants.autocompleteSftMaskSuggest
End Sub

Private Sub AxSftMask1_MatchAddCustomItems(ByVal sender As Object, ByVal e As AxSftMaskLib70._ISftMaskEvents_MatchAddCustomItemsEvent) Handles AxSftMask1.MatchAddCustomItems
    ' Ready to add custom items
    AxSftMask1.AutoComplete.AddTop("ZIP-Code Lookup ...", 1)
    AxSftMask1.AutoComplete.AddTop("State Lookup ...", 2)
    If e.count > 6 Then
        AxSftMask1.AutoComplete.AddBottom("ZIP-Code Lookup ...", 2)

VB6

    SftMask1.Mask = "#####"
    SftMask1.EntrySelect = entrySftMaskSelectEndHome

    AutoCompleteObj.File = "-\Softelvdm\AutoComplete\SampleFile2.Suggest"
    AutoCompleteObj.Encrypt = False
    AutoCompleteObj.IgnoreCase = True
    AutoCompleteObj.MaxEntries = 50
    AutoCompleteObj.Mode = autocompleteSftMaskSuggest
End Sub

Private Sub SftMask1_MatchAddCustomItems(ByVal Count As Long)
    ' Ready to add custom items
    SftMask1.AutoComplete.AddTop "ZIP-Code Lookup ...", 1
    SftMask1.AutoComplete.AddTop "State Lookup ...", 2
    If Count > 6 Then
        SftMask1.AutoComplete.AddBottom "ZIP-Code Lookup ...", 2

C#

    axSftMask1.Mask = "#####";
    axSftMask1.EntrySelect = SftMaskEntrySelectConstants.entrySftMaskSelectEndHome;

    AutoCompleteObj.File = @"-\Softelvdm\AutoComplete\SampleFile2.Suggest";
    AutoCompleteObj.Encrypt = false;
    AutoCompleteObj.IgnoreCase = true;
    AutoCompleteObj.MaxEntries = 50;
    AutoCompleteObj.Mode = SftMaskAutoCompleteModeConstants.autocompleteSftMaskSuggest;
}

private void axSftMask1_MatchAddCustomItems(object sender, AxSftMaskLib70._ISftMaskEvents_MatchAddCustomItemsEvent e)
{
    // Ready to add custom items
    axSftMask1.AutoComplete.AddTop("ZIP-Code Lookup ...", 1);
    axSftMask1.AutoComplete.AddTop("State Lookup ...", 2);
    if (e.count > 6) {

C++

    m_pMask1->Mask = _T("#####");
    m_pMask1->EntrySelect = entrySftMaskSelectEndHome;

    pAutoComplete->File = _T("-\\Softelvdm\\AutoComplete\\SampleFile2.Suggest");
    pAutoComplete->Encrypt = VARIANT_FALSE;
    pAutoComplete->IgnoreCase = VARIANT_TRUE;
    pAutoComplete->MaxEntries = 50;
    pAutoComplete->Mode = autocompleteSftMaskSuggest;

    return TRUE;
}

void CProject1Dlg::OnMatchAddCustomItemsSftMask1(long Count)
{
    // Ready to add custom items
    m_pMask1->AutoComplete->AddTop(_T("ZIP-Code Lookup ..."), 1);

See Also SftMaskAutoComplete Object | Object Hierarchy


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