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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change forecolor of a color group

Thread ID:





13190 Apr 22,2004 11:28 AM UTC Apr 22,2004 07:40 PM UTC WinForms 1
Tags: EditControl
Dmitry Budnitsky
Asked On April 22, 2004 11:28 AM UTC

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 07:40 PM UTC

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


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.

Please sign in to access our forum

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

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

Live Chat Icon For mobile
Live Chat Icon