Results 1 to 10 of 10

Thread: .Net Script Editor Control

  1. #1
    devoured is offline VB.NET Forum Newbie
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Oct 2008
    Posts
    7
    Reputation
    0

    .Net Script Editor Control

    Hello All,
    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!

  2. #2
    Hack's Avatar
    Hack is offline VB.NET Forum Master
    .NET Framework
    .NET 3.0 (VS 2005/2008)
    Join Date
    Apr 2009
    Location
    Sterling Heights, MI
    Posts
    336
    Reputation
    137
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Good Article: Language Enhancements In VS 2010
    Microsoft MVP 2005/2006/2007/2008/2009/2010

  3. #3
    devoured is offline VB.NET Forum Newbie
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Oct 2008
    Posts
    7
    Reputation
    0
    Hey Hack,
    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!!!

  4. #4
    Hack's Avatar
    Hack is offline VB.NET Forum Master
    .NET Framework
    .NET 3.0 (VS 2005/2008)
    Join Date
    Apr 2009
    Location
    Sterling Heights, MI
    Posts
    336
    Reputation
    137
    I'm not real sure what you mean by "collapsible code"...
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Good Article: Language Enhancements In VS 2010
    Microsoft MVP 2005/2006/2007/2008/2009/2010

  5. #5
    devoured is offline VB.NET Forum Newbie
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Oct 2008
    Posts
    7
    Reputation
    0
    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.

    Any ideas?

  6. #6
    Hack's Avatar
    Hack is offline VB.NET Forum Master
    .NET Framework
    .NET 3.0 (VS 2005/2008)
    Join Date
    Apr 2009
    Location
    Sterling Heights, MI
    Posts
    336
    Reputation
    137
    Ahhhhh...gotcha.

    So, my next question would be are you familiar with populating a TreeView control or is that actually your next question?
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Good Article: Language Enhancements In VS 2010
    Microsoft MVP 2005/2006/2007/2008/2009/2010

  7. #7
    devoured is offline VB.NET Forum Newbie
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Oct 2008
    Posts
    7
    Reputation
    0
    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.

  8. #8
    Hack's Avatar
    Hack is offline VB.NET Forum Master
    .NET Framework
    .NET 3.0 (VS 2005/2008)
    Join Date
    Apr 2009
    Location
    Sterling Heights, MI
    Posts
    336
    Reputation
    137
    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.
    Attached Images Attached Images
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Good Article: Language Enhancements In VS 2010
    Microsoft MVP 2005/2006/2007/2008/2009/2010

  9. #9
    devoured is offline VB.NET Forum Newbie
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Oct 2008
    Posts
    7
    Reputation
    0
    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:

    Sub Something()
    Dim a
    Dim b

    'Do some stuff
    End Sub

    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.

  10. #10
    devoured is offline VB.NET Forum Newbie
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Oct 2008
    Posts
    7
    Reputation
    0
    I do suppose you could refer to this as Code Folding as well.....

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •