QuestionDigital Rune Texteditor [solved]

Posts 18 of 8 · Page 1 of 1
It's like this is all I say
But, LEARN THE LANGUAGE FIRST!

I'm sorry but that's the best answer I can give.

And I don't thinks anyone else is going to help you.

But if anyone can help you it's @Hassan, he made his own language.
Uuh..srywhat?!
Ive been programming in VB now for about 3 yearskk?
Its just the first time im using this control.
Quote Originally Posted by edub18 View Post
Uuh..srywhat?!
Ive been programming in VB now for about 3 yearskk?
Its just the first time im using this control.
Okay, then ask @Hassan, he might know.
Multiple ways of going about it, finding the most efficient is the hardest part, and making it foolproof is also difficult. If you're triggering syntax highlighting on the "textchanged" event, you're going to have to do some filtering about where to start and finish applying the syntax highlighting, as a textbox with a hundred lines of text will start lagging insanely if the whole thing is being parsed for syntax highlighting EVERY TIME someone types.

First step is to obtain a list of the words you want to highlight, you can find a lot of them on MSDN if you search for stuff like "Visual Basic Keywords List MSDN" or something like that.

Next you've got to add that list somewhere into your project (either through My.Settings, or even in a .txt file accompanying the project and to be loaded into a list at runtime.

After that, my idea would be to create a dictionary(Of String, Color) for each of the keywords, to add the color of their highlighting associated with the keyword.

Now you'll need to write some method that takes an input string, and a richtextbox control and does all the syntax highlighting for that given string.

That's really it.
It looks like you dont know DigitalRune, but thanks. I already got it working
Quote Originally Posted by edub18 View Post
It looks like you dont know DigitalRune, but thanks. I already got it working
Who were you talking to, Jason or me?
Quote Originally Posted by edub18 View Post
Can someone tell me, how to make my own syntax highlighting for my own language?
Thanks
I assumed you didn't want to use DigitalRune any more and make your OWN syntax highlighting as you stated in your post -.-
Posts 18 of 8 · Page 1 of 1

Post a Reply

Tags for this Thread

Need help?