SftMask/OCX 6.5

SftMask.Matching Event

Softel vdm, Inc.

Accept an autocomplete text entry for display.

Syntax       

VB.NET

Private Sub object_Matching(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.Matching

VB

Private Sub object_Matching(ByVal Text As String, EntryText As String, Accept As Boolean)

C#.NET

void object_Matching(object sender, EventArgumentType e);

VC++

void OnMatchingobject(_bstr_t Text, _bstr_t* EntryText, VARIANT_BOOL* Accept);

C

HRESULT OnMatchingobject(BSTR Text, BSTR* EntryText, VARIANT_BOOL* Accept);

Delphi

procedure objectMatching(Sender: TObject; Text : WideString; var EntryText : WideString; var Accept : WordBool);

object

A SftMask object.

Text

A string containing the current control contents. Equivalent to the Text property (including all literals, regardless of the current ClipMode settings).

EntryText

A string containing the saved autocomplete entry about to be added to the list. The EntryText parameter can be modified to change the text. If this is an empty string, this is the initial call.

Accept

A Boolean value. If True is returned, the saved autocomplete text entry is added to the list. If False is returned, the saved autocomplete entry is not added to the list.

Comments

The Matching event occurs to determine whether to accept an autocomplete text entry for display.

The Matching event can be used to reject or modify an autocomplete entry that is about to be added to the list for display.

This event occurs for each saved autocomplete entry. The control evaluates the Accept parameter before invoking this event, using its built-in matching mechanism. The Matching event does not need to be implemented to use the built-in matching mechanism of the control.

While handling this event, the Masked Edit control must not be updated through its methods or properties.

Custom entries can be added using the AutoComplete.AddTop and AutoComplete.AddBottom methods.


Feedback / comments / error reports for this topic
© 2000, 2008 - Softel vdm, Inc. - www.softelvdm.com