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.
Unfortunately, activation email could not send to your email. Please try again.

Change forecolor of a color group

Thread ID:

Created:

Updated:

Platform:

Replies:

13190 Apr 22,2004 07:28 AM Apr 22,2004 03:40 PM Windows Forms 1
loading
Tags: EditControl
Dmitry Budnitsky
Asked On April 22, 2004 07:28 AM

I have to give the user a way to dynamically change the color of keywords. Can you give me a hint how to do it? Thanks

Administrator [Syncfusion]
Replied On April 22, 2004 03:40 PM

Hi Dmitry, To change the color for a ColorGroup all you would need to do is call AddColorGroup(). For example in the DynamicSettings sample that ships with Essential Edit, you could add another button say ChangeKeyWordColor and then you could add the following code snippet in it''s click event: string strTemp = textBoxKeyword.Text; this.editControl1.AddColorGroup("KeyWord",Color.Red,Color.White,true,true,Syncfusion.Windows.Forms.Edit.EditColorGroupType.RegularText); editControl1.AddKeyword(strTemp,"KeyWord"); Now if you enter a KeyWord in the anc click on the ChangeKeyWordColor the keywords will be red instead of blue. Here is the modified sample. Take a look and let us know if you have any further questions. Regards Arun

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.

;