Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

MaxEntries Property, SftMaskAutoComplete Object

Defines the maximum number of saved autocomplete entries.

Syntax

Get

VB.NETCount = object.MaxEntries As Short
VBCount = object.MaxEntries As Integer
C#.NETshort Count = object.MaxEntries;
VC++short Count = object->MaxEntries;
short Count = object->GetMaxEntries();
CHRESULT object->get_MaxEntries(short* Count);

Put

VB.NETobject.MaxEntries = Count As Short
VBobject.MaxEntries = Count As Integer
C#.NETshort object.MaxEntries = Count;
VC++short object->MaxEntries = Count;
void object->PutMaxEntries(short Count);
CHRESULT object->put_MaxEntries(short Count);

object

A SftMaskAutoComplete object.

Count

Defines the maximum number of saved autocomplete entries, between 1 and 1000.

Comments

The MaxEntries property defines the maximum number of saved autocomplete entries.

The MaxEntries property is used to limit the maximum number of entries stored in the defined file (see AutoComplete.File property).

Generally, only a small number of entries should be saved, otherwise the amount of data presented to the user may not be useful and may slow data entry. For larger amounts of data, a combo box control may be a better choice than using the Masked Edit control's autocomplete feature.

If the AutoComplete.Contents property is set to contentsSftMaskFiles, contentsSftMaskDirs or contentsSftMaskFilesDirs, the MaxEntries property has no effect as file/directory lists or selections are never saved..

Examples

VB.NET

    CaptionObj.Text = "&ZIP Code:"

    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)

VB6

    CaptionObj.Text = "&ZIP Code:"

    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

C#

    CaptionObj.Text = "&ZIP Code:";

    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);

C++

    pCaption->Text = _T("&ZIP Code:");

    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)
{

See Also SftMaskAutoComplete Object | Object Hierarchy


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