[wxPython-users] STC coloring

Ben Kaplan bskaplan14 at yahoo.com
Mon Feb 4 09:34:15 PST 2008


Neither of those worked.

>From what I can tell, if I call stc.StartStyling before I try changing the style, the text I add flashes red before reverting to the lexer style. If I don't call StartStyling, then everything from the current styling position down appears red. Could StartStyling be adding another event handler for the style events?

----- Original Message ----
From: Robin Dunn <robin at alldunn.com>
To: wxPython-users at lists.wxwidgets.org
Sent: Wednesday, January 30, 2008 4:38:28 PM
Subject: Re: [wxPython-users] STC coloring


Ben 
Kaplan 
wrote:
> 
Well, 
I 
tried 
it, 
but 
it 
doesn't 
work 
quite 
right. 
I'm 
using 
a 
lexer 
to 
> 
color 
the 
rest 
of 
the 
text. 
The 
lexer 
styles 
are 
applied 
after 
I 
set 
the 
> 
styling 
on 
the 
error 
message. 
The 
line 
flashes 
red, 
then 
goes 
to 
the 
> 
lexer's 
style. 
Is 
there 
any 
way 
to 
have 
the 
lexer 
ignore 
specific 
areas?

The 
Scintilla 
docs 
hint 
that 
it 
is 
possible 
to 
do 
custom 
styling 
in 
addition 
to 
the 
styling 
that 
a 
lexer 
does, 
but 
it 
doesn't 
give 
any 
details 
that 
I 
can 
see.  
You 
might 
try 
doing 
your 
custom 
styling 
in 
a 
delayed 
fashion 
(via 
wx.CallAfter 
or 
even 
EVT_IDLE) 
so 
it 
will 
be 
done 
after 
the 
lexer 
has 
processed 
that 
part 
of 
the 
text, 
and 
see 
if 
that 
takes 
care 
of 
it 
for 
you.

-- 
Robin 
Dunn
Software 
Craftsman
http://wxPython.org  
Java 
give 
you 
jitters?  
Relax 
with 
wxPython!


---------------------------------------------------------------------
To 
unsubscribe, 
e-mail: 
wxPython-users-unsubscribe at lists.wxwidgets.org
For 
additional 
commands, 
e-mail: 
wxPython-users-help at lists.wxwidgets.org







      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20080204/0796ca6c/attachment.htm


More information about the wxpython-users mailing list