HeaderPane
Main
Hide
Share Link
Print

MaxEntries Property, SftMaskAutoComplete Object

Defines the maximum number of saved autocomplete entries.

Syntax

Get

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

Put

C#short object.MaxEntries = Count;
VB.NETobject.MaxEntries = Count As Short
C++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

C# View entire sample code

    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, AxSftMaskLib80._ISftMaskEvents_MatchAddCustomItemsEvent e)
{
    // Ready to add custom items
    axSftMask1.AutoComplete.AddTop("ZIP-Code Lookup ...", 1);

VB.NET View entire sample code

    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 AxSftMaskLib80._ISftMaskEvents_MatchAddCustomItemsEvent) Handles AxSftMask1.MatchAddCustomItems
    ' Ready to add custom items
    AxSftMask1.AutoComplete.AddTop("ZIP-Code Lookup ...", 1)
    AxSftMask1.AutoComplete.AddTop("State Lookup ...", 2)

C++ View entire sample code

    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 11/15/2026 - (email)
© 2026 Softel vdm, Inc.