All,
I am folloing the syntax highlighting tutorial "Syntax Highlighting in Rich TextBox Control - Part 1"
my string displays in the richtextbox, but I cannot get the highlighting to display.
is there any pointers or issues with richtextbox controls, displaying syntax highlighting?
Jeremy
Loading
Mike HankeyPosted May 11, 2008, 3:25 PM
If you could provide some code I could probably help you as I've writen a syntax highlighting control.
Generally I've found if your having problems its the RTF formatting that not correct. A good source for this is; O'Reilly "RTF Pocket Guide.
Another trick I found is that if you do the following in you text box it helps write/debug your RTF;
if (Text.StartsWith(@"{\rtf1"))
wRichTextBox1.Rtf = Text;
else
wRichTextBox1.Text = Text;
This will allow you to toggle the text within the RichTextBox to display either in RTF or just text.
Hope this helps
Mike