[v2] Scintilla Edit control class

Post your working scripts, libraries and tools.
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

[v2] Scintilla Edit control class

24 Mar 2019, 11:49

I wanted to use the Scintilla edit control in a SQLite Database Viewer application but there's not much out there for AHK v2. I liked the elegance of the implementation by RaptorX for AHK v1.1 but wanted to eliminate the globals and just make use of class methods, not hidden functions in the global namespace with a prefix.

I used the modified version of the class that Alguimist uses in AutoGUI. Thanks to both RaptorX and Alguimist for giving me that start I needed!

This is what I ended up with for now. Built and tested using AHK v2.0-a100-52515e2 and 64-bit SciLexer.dll. Code and a pretty simple example is hosted on GitHub - https://github.com/kczx3/Scintilla

Appreciate any comments and suggestions.
freakkk
Posts: 25
Joined: 21 Sep 2014, 20:14

Re: [v2] Scintilla Edit control class

24 Mar 2019, 15:03

Thank you for the improvements you've made to this! I was planning on using this control in something in the next month or so already, so I'll definitely be using this recently refreshed library to start from when I do.
User avatar
BGM
Posts: 507
Joined: 20 Nov 2013, 20:56
Contact:

Re: [v2] Scintilla Edit control class

26 Mar 2019, 09:53

Does anyone have the link for the scintilla control for version 1 autohotkey?
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: [v2] Scintilla Edit control class

27 Mar 2019, 07:39

Updated example script to show how one can implement Multiple Documents utilizing a single Scintilla control instead of creating a separate control instance for each document.
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: [v2] Scintilla Edit control class

28 Mar 2019, 14:16

The example looks great, very well done :clap:

Cheers, thanks for sharing!
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: [v2] Scintilla Edit control class

28 Mar 2019, 14:59

Thanks! Means a lot coming from you :thumbsup:
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: [v2] Scintilla Edit control class

28 Mar 2019, 19:15

Helgef wrote:
28 Mar 2019, 14:16
The example looks great, very well done :clap:

Cheers, thanks for sharing!
Realized the deleteDoc function in the example wasn't quite working properly and fixed that.
Added in showing how a single document can be shared between two Scintilla instances.
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: [v2] Scintilla Edit control class

29 Mar 2019, 14:38

Improved the document splitting code and you can now unsplit documents.
The split document (right side) always is synced to the current document in the main (left side) control.
oif2003
Posts: 214
Joined: 17 Oct 2018, 11:43
Contact:

Re: [v2] Scintilla Edit control class

20 Feb 2020, 16:35

Thanks for posting this. I needed a simple editor control so I took portions of your code to build this minimalist demo and updated it for the lastest v2 (2.0-a108-a2fa0498). Maybe this will be useful to others as well.
Spoiler
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: [v2] Scintilla Edit control class

20 Feb 2020, 19:43

Thanks! Glad it inspired you!

Return to “Scripts and Functions (v2)”

Who is online

Users browsing this forum: pgeugene and 25 guests