Reputation: 509
I wrote my own lexer
I want to add my own new lexer to StyledTextCtrl
in wxpython? I am currently operating on Windows
Upvotes: 0
Views: 805
Reputation: 33071
You'll probably have to subclass the control and override the SetupBaseStyles where you'll have to use the StyleSetSpec to specify your lexer's settings. Here is a link that walks you through a lot of the process:
http://packtlib.packtpub.com/library/9781849511780/ch04lvl1sec05
And here's the official wxPython wiki page on the subject:
http://wiki.wxpython.org/StyledTextCtrl%20Lexer%20Quick%20Reference
Finally, here's a link to a short example:
http://nullege.com/codes/search/wx.stc.StyledTextCtrl.SetLexer
Upvotes: 1