.Net Script Editor Control
I am writing an application that is going to allow users to write .Net script to perform various tasks. I would like to have a slim editor for the users to utilize when writing .Net script. I was hoping to get collapsible code, syntax highlighting, line numbering etc, things like intellisense would be awesome but definitely not a requirement at the moment. Is anyone aware of anything like this that may already exist? Ideally I would like to get a control that encompasses this, get a class going and be on my way. At any rate, I was hoping that someone could point me in the right direction of either a control or an existing project that I could gleam from. What do you guys think? As always, thank you in advance!
I did alot of google searching for full IDE's and was not happy with the results, but what you found is awesome. What I envision doing is creating different RegEx libraries for different languages (if needed) in regards to syntax highlighting, then just have a editor class property "Language" to play with. Thanks a million for producing this, I am exciting to incorporate it.
Now unto the collapsible code. My google searches have revealed a good amount of different approaches. What I am wondering, has anyone here actually done a collapsible code editor and have any insight into the successes and pitfalls?
As always, thank you in advance!!!
I'm not real sure what you mean by "collapsible code"...
My mistake, I should have clarified on this aspect. By collapsible code, I mean having a tree structure on the left hand side of the code that allows you to expand and close sections of the code, such as Subs, Functions, Regions, etc. I, to an extent, want to mimic things like Visual Studio, .Net Editor, Notepad++ in this respect.
So, my next question would be are you familiar with populating a TreeView control or is that actually your next question?
Yea, I have done a bit of work with the Treeview control, that won't be an issue. I have seen using a Treeview for this chatted about on boards, but I guess I fail to make the connection. I'm not sure how I use the control to make the RichTextBox (I plan on using this control for the editing) behave in a manner to show collapsible code.
Something like this perhaps....(this is my code library) - the right hand pane is a richtextbox. All the code routines are saved in a database and the left pane treeview is loaded from the database when the program executes.
Right. But how would you collapse code at that point? I would like to be able to collapse the actual code in the RichTextBox, so that when a user is writing script, they can collapse the Methods to clean up workspace. So instead of seeing:
'Do some stuff
In the RichTextBox, they could collaspe it to see:
+ Sub Something()
Does that make sense? I apologize if I am not speaking correctly haha, it would definitely not be the first time that has happened.
I do suppose you could refer to this as Code Folding as well.....