LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

syntax coloring text editor

I am designing my own editor in lab windows CVI.
I want to use syntax coloring for the source code text.
Use of different colors for tokens,keywords constants etc. what control should i use and how should i go about programming my application.

with gratitude
vivek $
0 Kudos
Message 1 of 3
(3,134 Views)
> I am designing my own editor in lab windows CVI.
Using a UIR listbox ?

> I want to use syntax coloring for the source code text.
> Use of different colors for tokens,keywords constants etc. what
> control should i use and how should i go about programming my
> application.
If so, there are color escape codes you can insert in the text. I remember seeing it discussed
many times before. ..\samples\userint\listdelx.prj' contains the info needed.
A simple parser should be able to do that.

--
Guillaume Dargaud
http://www.gdargaud.net/
"It's a little-known fact that the Y1K problem caused the Dark Ages."
0 Kudos
Message 2 of 3
(3,134 Views)
Seems to me that the list box is your best bet for this application. I would suggest that every time the user types a space key you run that line through your parser to add the coloring tokens. You should also keep a copy of the data without any of the coloring tokens to be able to easily compile the file latter on.

Good luck with your project.

Regards,

Juan Carlos
0 Kudos
Message 3 of 3
(3,134 Views)