Link to home
Start Free TrialLog in
Avatar of flosoft
flosoft

asked on

VB.NET RTB Syntax highligting.

Any suggestion on syntax highlighting in vb.net utilizing a rtb?

Preferable read keywords, comments etc from a db or xml file, and do fairly quickly. The keywords and comments etc need to be in a db or xml or the like so the keyword list can grow and expand with different languages. I have gotten several ways to work ok, but they seem slow compared to simular things I have used. This would be more of a cut and paste, highlight, and possible a highlight while typing.


Thanks
Avatar of Fahad Mukhtar
Fahad Mukhtar
Flag of Pakistan image

Avatar of flosoft
flosoft

ASKER

Looked at them, I am more looking for a decent start to highlighting like the VB6 or VS.Net does with code syntax, keywords etc.


Thanks.
Avatar of flosoft

ASKER

No source for how it is done and when pasting in a module's code it seems a bit slow, nice example. Might work and be nice if I could see the source code. guess I'll raise the points to 400.
the source is in the workspace. go back to here http://workspaces.gotdotnet.com/codebox and following the link to source control. You might need to apply to join the workspace, thats fine.

It is slow cause there is a big and it colourizes too many times. I'm not happy which is why there is a workspace for it to get some other interested people involved in improving it.

Russ
ASKER CERTIFIED SOLUTION
Avatar of RussGreen
RussGreen
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of flosoft

ASKER

Got the code, I am playing with it a bit trying to implement it in a usercontrol so it can be dropped onto a form, rather than coding it in, once I get that done, I'll see what I can do on performance.

I am still looking a bit for a regex or faster way...wonder how vb and vs do it so fast?
it is in a user control? the project will compile into codebox.dll

Will you join the workspace and share your findings?

Russ
Avatar of flosoft

ASKER

If I make any significant changes, I will share them there and post them here, at the moment I am experimenting parsing with regular expressions and using an xml file to store the keywords which is a complete departure from codebox. It seems that perhaps the fastest way would be to write the raw rtf to file on the fly and then load it into a richtextbox, it makes a hard disk hit, but is real quick. Anyways, just a few idea's going on until maybe someone on here can post some code that already is fast at doing this.
Avatar of Bob Learned
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: RussGreen {http:#9844757}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer