PDA

View Full Version : c# editor-program highlighting


DELOCH
08-01-2006, 06:39 PM
Hello again...

I have a little program, I have an editor planned out but one thing seems not to work...

I dont know how to make a syntax highlighting based on an array..

I want to make an array of words eg: eggshell, cookie, milk and whatever...

and make the text written into TextBox1 that == the array word's foreground become a specific color

eg: arrayBlue as a blue highlighted array; and arrayRed as the red highlighted array...

Thanks I really need this info... :D

oracleguy
08-01-2006, 07:48 PM
You'd need to display the text in a control that supports having different parts of the contents different colors. I think one of the richtext controls can do it.

DELOCH
08-01-2006, 09:22 PM
Oh...

But how do i select a specific part of it...

I know in HTML you can replace the text with <something style="color:red">text</something> but how do I select the specific part of the text?

Thanks in advance :D

Melon00
08-08-2006, 08:08 PM
What do you mean by select a specific part of it?

Do you mean, be able to change the background of the text?

Do you mean having a text string like "eggshell cookie milk" in one text box and having eggshell and milk be blue and cookie be red?