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

Change forecolor of a color group

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

1 Reply

AD Administrator Syncfusion Team 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

Loader.
Up arrow icon