Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

AddBottom Method, SftMaskAutoComplete Object

Adds a custom autocomplete entry at the bottom of the list.

Syntax

VB.NETobject.AddBottom(ByVal EntryText As String, ByVal EntryType As Short)
VBobject.AddBottom(ByVal EntryText As String, ByVal EntryType As Integer)
C#.NETvoid object.AddBottom(string EntryText, short EntryType);
VC++HRESULT object->AddBottom(_bstr_t EntryText, short EntryType);
CHRESULT object->raw_AddBottom(BSTR EntryText, short EntryType);

object

A SftMaskAutoComplete object.

EntryText

The text to be added as an entry in the list of suggestions.

EntryType

A numeric value which is used once the user selects and accepts an entry. This value is passed to the MatchCustom event as EntryType argument. This value cannot be 0.

Comments

The AddBottom method adds a custom autocomplete entry at the bottom of the list.

The AddBottom and AddTop methods can only be used while handling a MatchAddCustomItems event.

Custom entries are only available if the AutoComplete.Mode property is defined as autocompleteSftMaskSuggest. Other modes do not support custom entries.

If the user selects and accepts a custom entry, the MatchCustom event occurs.

Examples

VB.NET

    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)
        AxSftMask1.AutoComplete.AddBottom("State Lookup ...", 2)
    End If
End Sub

Private Sub AxSftMask1_MatchCustom(ByVal sender As Object, ByVal e As AxSftMaskLib70._ISftMaskEvents_MatchCustomEvent) Handles AxSftMask1.MatchCustom
    If e.entryType = 1 Then
        AxSftMask1.Rollup()

VB6

    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
        SftMask1.AutoComplete.AddBottom "State Lookup ...", 2
    End If
End Sub

Private Sub SftMask1_MatchCustom(ByVal Text As String, ByVal EntryText As String, ByVal EntryType As Integer)
    If EntryType = 1 Then
        SftMask1.Rollup

C#

}

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) {
        axSftMask1.AutoComplete.AddBottom("ZIP-Code Lookup ...", 2);
        axSftMask1.AutoComplete.AddBottom("State Lookup ...", 2);
    }
}

private void axSftMask1_MatchCustom(object sender, AxSftMaskLib70._ISftMaskEvents_MatchCustomEvent e)
{
    if (e.entryType == 1) {

C++

}

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

void CProject1Dlg::OnMatchCustomSftMask1(LPCTSTR Text, LPCTSTR EntryText, short EntryType)
{
    if (EntryType == 1) {

See Also SftMaskAutoComplete Object | Object Hierarchy


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