i am new here, and i am also a beginner C# programmer (used to code in VB6-VB.NET for 6-8 years and moved on to C# just about a year ago)
first i would like to note that this is NOT a homework assignment
i am building a simple syntax highlighting method for a RichTextBox in a source code editor i am writing using C#+WinForms
i was having some issues with the basic highlighting , but than found an interesting tutorial here on DIC and it helped me to find where i was wrong - now works fine.
however,
i am trying to figure out how to make a single comment ( // ) highlighted right, and can't seem to get this right.
well as much as i understand, about highlighting a comment line it should be:
1. find a match for a '//'
2. change font color to desired color
3. let it stay at the same color for comment until found a '\n' (enter..new line)
or am i missing something?
i can not get this to work in RTB, with simple text its easy to find positions , starts and ends in a text array- but somehow in a rtb i find it harder to get done.
any help would be very much appreciated!
many thanks :-)
This post has been edited by binary_refinary: 07 November 2009 - 03:11 AM

Start a new topic
Add Reply





MultiQuote
| 


