We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How do I highlight the items in the ContextPrompt list for the current parameter to be given as an input, in the EditControl?

Platform: WinForms |
Control: EditControl |
Published Date: April 30, 2011 |
Last Revised Date: July 10, 2014


For highlighting the items in the ContextPrompt list for the current parameter to be given as an input, you need to handle the ContextPromptUpdate event.

Refer to the code snippets to know more about it.


private void editControl1_ContextPromptUpdate(object sender, Syncfusion.Windows.Forms.Edit.ContextPromptUpdateEventArgs e)


// Select the items that should be bolded

if( e.List.SelectedItem != null )


IList list = editControl1.GetLexemsInsideCurrentStack( false );

if( list == null ) return;

int iBoldedIndex = 0;

foreach( ILexem lexem in list )


if( lexem.Text == "," )



if( iBoldedIndex >= e.List.SelectedItem.BoldedItems.Count )

e.List.SelectedItem.BoldedItems.SelectedItem = null;


e.List.SelectedItem.BoldedItems.SelectedItem = e.List.SelectedItem.BoldedItems[iBoldedIndex];




Private Sub editControl1_ContextPromptUpdate(sender As Object, e As

Syncfusion.Windows.Forms.Edit.ContextPromptUpdateEventArgs) Handles editControl1.ContextPromptUpdate

// Select the items that should be bolded

If Not (e.List.SelectedItem Is Nothing) Then

Dim list As IList = editControl1.GetLexemsInsideCurrentStack(False)

If list Is Nothing Then


End If

Dim iBoldedIndex As Integer = 0

Dim lexem As ILexem

For Each lexem In list

If lexem.Text = "," Then

iBoldedIndex += 1

End If

Next lexem

If iBoldedIndex >= e.List.SelectedItem.BoldedItems.Count Then

e.List.SelectedItem.BoldedItems.SelectedItem = Nothing


e.List.SelectedItem.BoldedItems.SelectedItem = e.List.SelectedItem.BoldedItems(iBoldedIndex)

End If

End If

End Sub 'editControl1_ContextPromptUpdate

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon