Syntax Highlighting in a ListBox
Posted
by ph0enix
on Stack Overflow
See other posts from Stack Overflow
or by ph0enix
Published on 2009-04-30T05:48:48Z
Indexed on
2010/03/28
15:03 UTC
Read the original article
Hit count: 203
Hi all,
I've searched the web and I can't seem to find anything that will work for me. I've seen plenty of discussion, and even some fairly extensible open-source tools, for code editors that provide line numbers and syntax highlighting.
Here's my dilemma...
I'm working on a "digital code review" project in C#.NET that allows users to specify source files, add them to a particular session, and other users can make comments and line references to the files being reviewed.
Basic requirements:
- Must be written in C#.NET
- I don't need to be able to edit the text in the text box
- Users need to be able to select a line (or multiple lines), to make line references.
It seems to me that I need some fancy implementation of a ListBox control (not a drop-down list) that has some OwnerDraw capabilities to add line numbers and syntax highlighting. Unfortunately, I haven't had any luck putting it together myself, and I can't seem to find a control that's already been written or a reference on how I might be able to accomplish this.
Any suggestions??
© Stack Overflow or respective owner