[wxPython-users] stc colouring for mail quote
Josiah Carlson
jcarlson at uci.edu
Wed Oct 4 09:14:13 PDT 2006
Franz Steinhaeusler <franz.steinhaeusler at gmx.at> wrote:
>
> Hello NG,
>
> is it possible (I want to use the styled text control)
> to have a lexer (if not already exist one,
> to write an own, when this is possible in wxPython)
> for displaying of Usenet and mail messages.
Standard lexers for Scintilla/StyledTextCtrl are written in C++.
> If not:
> Is the best way to use the EVT_STC_STYLENEEDED and search with
> (regular expressions) to determine the position
> and the colour of the text.
If you want to get the EVT_STC_STYLENEEDED event, you must use the
STC_LEX_CONTAINER lexer. And at least for that particular application
(coloring based on quoting level), writing your own 'lexer' based on
EVT_STC_STYLENEEDED events isn't bad.
- Josiah
More information about the wxpython-users
mailing list