Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

Refresh Method, SftMaskAutoComplete Object

Updates or displays autocomplete information.

Syntax

VB.NETobject.Refresh()
VBobject.Refresh
C#.NETvoid object.Refresh();
VC++HRESULT object->Refresh();
CHRESULT object->raw_Refresh();

object

A SftMaskAutoComplete object.

Comments

The Refresh method updates or displays autocomplete information.

The Refresh method can be used to initiate display of autocomplete information under program control.

The Refresh method sets the input focus to the Masked Edit control and displays the available autocomplete information.

If the AutoComplete.Mode property is defined as autocompleteSftMaskSuggest or autocompleteSftMaskSuggestAppend, the list of suggestions is displayed or updated.

If the AutoComplete.Mode property is set to autocompleteSftMaskAppend, the first matching entry is used to complete the current input data.

Examples

VB.NET

    If e.entryType = 1 Then
        AxSftMask1.Rollup()
        MsgBox("We could be looking up ZIP codes in another application...")
        AxSftMask1.Text = "12345"
    End If
    If e.entryType = 2 Then
        AxSftMask1.Rollup()
        MsgBox("We could be looking up states in another application...")
        AxSftMask1.AutoComplete.Refresh()
    End If
End Sub

Private Sub AxSftMask1_Matching(ByVal sender As Object, ByVal e As AxSftMaskLib70._ISftMaskEvents_MatchingEvent) Handles AxSftMask1.Matching
    If Mid(e.entryText, 1, 1) = "0" Then
        ' don't show any ZIP code starting with a "0"
        e.accept = False

VB6

    If EntryType = 1 Then
        SftMask1.Rollup
        MsgBox ("We could be looking up ZIP codes in another application...")
        SftMask1.Text = "12345"
    End If
    If EntryType = 2 Then
        SftMask1.Rollup
        MsgBox ("We could be looking up states in another application...")
        SftMask1.AutoComplete.Refresh
    End If
End Sub

Private Sub SftMask1_Matching(ByVal Text As String, EntryText As String, Accept As Boolean)
    If Mid(EntryText, 1, 1) = "0" Then
        ' don't show any ZIP code starting with a "0"
        Accept = False

C#

    if (e.entryType == 1) {
        axSftMask1.Rollup();
        MessageBox.Show("We could be looking up ZIP codes in another application...");
        axSftMask1.Text = "12345";
    }
    if (e.entryType == 2) {
        axSftMask1.Rollup();
        MessageBox.Show("We could be looking up states in another application...");
        axSftMask1.AutoComplete.Refresh();
    }
}

private void axSftMask1_Matching(object sender, AxSftMaskLib70._ISftMaskEvents_MatchingEvent e)
{
    if (e.entryText[0] == '0') {
        // don't show any ZIP code starting with a "0"

C++

    if (EntryType == 1) {
        m_pMask1->Rollup();
        AfxMessageBox(_T("We could be looking up ZIP codes in another application..."), MB_OK, 0);
        m_pMask1->Text = _T("12345");
    }
    if (EntryType == 2) {
        m_pMask1->Rollup();
        AfxMessageBox(_T("We could be looking up states in another application..."), MB_OK, 0);
        m_pMask1->AutoComplete->Refresh();
    }
}

void CProject1Dlg::OnMatchingSftMask1(LPCTSTR Text, BSTR FAR* EntryText, BOOL FAR* Accept)
{
    if (*EntryText[0] == L'0') {
        //' don't show any ZIP code starting with a "0"

See Also SftMaskAutoComplete Object | Object Hierarchy


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