How do I use the Scintilla control?

  • Thread starter Thread starter RichF70
  • Start date Start date
R

RichF70

Guest
Hi All

Im assuming at least some people on here must have experience of the Scintilla control for creating a Notepad++ type application. Id like to use this control, unfortunately there is very little in the way of documentation or working examples around and as such I am totally stuck!

Im not even going to post any code as I am nowhere near anything worthy of critique. Rather I will just explain what I want to achieve and hopefully somebody will be able to post a snippet of code which will do the job and I can take it from there.

First, I want to control this with code rather than an xml file so that it is easier to adjust dynamically. So, my wishlist is:

1) Create five keyword lists and five styles (just different colours for now). Assign one style to each keyword list so that any word in that list is styled accordingly. The comment prefix is // and comments should be in green.

2) If one of my keywords is, for instance, ScintillaNET and I just type scintillanet, it should capitalize automatically as per the keyword in the list.

3) Where I have multiple keywords beginning with the same letters, I should get a list of possible words come up, much like an enumeration in vb.net.

4) Finally, it would be nice to be able to set the line number of my first line - for instance if I am using pages and I am viewing page 2 I might want to display just lines 101-200 and of course I would then want the line numbers to be 101-200 not 1-100, so I will want to set the first line to 101.

I dare say that once you know how to use Scintilla the above can all be achieved in little more than a few seconds with just a few lines of code and it will all look really obvious. So it would be fantastic if somebody could help me out here!

Many thanks

Rich

Continue reading...
 
Back
Top