method Edit.AddWild (Expression as String)
Adds a wild characters expression to a sensitive control.

 TypeDescription 
   Expression as String A string expression that specifies the HTML format for a wild characters expression. The wild characters supported are '*' and '?'.  
The AddWild method adds an expression that may contain wild characters like '*' or '?'. Use the FormatNumbers property to specify the format of the numbers in the control. Use the AddKeyword method to add new keywords to the control. Use the AddExpression method to add new expressions to the control.

For instance the following VB sample underlines all ' ' ( space character ) in the text:

With Edit1
        .AddWild ("<u> </u>")
End With 

Note that if you are adding a keyword like:

With Edit1
        .AddKeyword ("<u>a</u>")
End With

only 'a' characters that is a separated word will be underlined. The wild characters expression may contain '*' that means any string of characters and '?' that means a single character. For instance the following sample bolds all expressions that starts with '<' and ends with the '>'  and it has at least once character inside.

With Edit1
        .AddWild ("<b><?*></b>")
End With

Note that if you are adding an expression that starts with '<' and ends with '>' the expression will be highlighted even there is no character between them:

With Edit1
        .AddExpression "<b><</b>", "<b> </b>", "<b>></b>"
End With

If you want to highlight only the part between '<' and '>' then you should use a sample like follows:

With Edit1
        .AddExpression "<", "<b> </b>", ">"
End With

The following C++ sample underlines all ' ' ( space character ) in the text:

m_edit.AddWild("<u> </u>");

The following VB.NET sample underlines all ' ' ( space character ) in the text:

With AxEdit1
    .AddWild("<u> </u>")
End With

The following C# sample underlines all ' ' ( space character ) in the text:

axEdit1.AddWild("<u> </u>");

The following VFP sample underlines all ' ' ( space character ) in the text:

With thisform.Edit1
	.AddWild("<u> </u>")
endwith

 


Send comments on this topic.
© 1999-2008 Exontrol Inc, Software. All rights reserved.