Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Syntax highlighting in C#??
Name: El-Trucha Date: April 30, 2005 at 23:44:50 Pacific OS: Windows XP SP2 CPU/Ram: 2.8 GHz/448 MB
Comment:
Hello every1!! :D OK, what I need now is to make a text editor for a programming language (which I'm not telling so nobody copies me... :P ) in a RichTextBox in C#... How do I do this?? I want to, for example, highlight if statements with blue... How do I do this?? Thanx!!! ;)
Name: StuartS Date: May 1, 2005 at 09:58:22 Pacific
Reply:
Look up Find, SelStart and SelLength and SelColor in the RichText Help files.
Find returns the starting location of the If statement. SelStart takes the value of find and SelLength takes the length of the item to highlight, in this Case 2. Then use SelColor to set the colour. Repeat as many times as necessary.
Stuart
0
Response Number 2
Name: El-Trucha Date: May 1, 2005 at 13:28:17 Pacific
Reply:
Well...I searched both Google and MSDN and I found out that all of those are only for VB...I was thinking of C#... :P Thanx!! ;)
Name: borelli35 Date: May 2, 2005 at 14:24:39 Pacific
Reply:
==================================================================== Actually, since the richedit box is a Microsoft component that is completly independent of programming languages, you can use the methods mentioned by Stuart.
borelli35
0
Response Number 4
Name: El-Trucha Date: May 2, 2005 at 14:50:57 Pacific
Reply:
But in what class are the methods in then?? They're not in the System.Windows.Forms.RichTextBox class... Thanx!! ;)
Summary: Can you define another language for highlighting in the IDE (Visual C++ .NET). I would like to be able to select highlighting for a unsupported scripting language in much the same way that you can do ...
Summary: There is no such thing as a VB API. APIs can be used by any language as they are part of the operating system. VB,C++, C# and many others. The only difference is the syntax. Do a search on at Micro...
Summary: You need to start with the correct understanding of the definitions of the words you have including with your inquiry. To start with the words you used as examples all have distinct differences in wh...