Josiah Carlson: > Scintilla has its lexer set, but I would like to > manually style certain portions of the document. More specifically, I > am using scintilla as the input/output of an interactive shell, and I > would like to "style" the output of the shell using a particular > foreground color. I have created a style via the STYLESET* equivalent > methods in wxPython, but I get incorrect results...
This is not well supported by Scintilla. > lp = <some non-ending position> > ld = len(data) > es = self.GetEndStyled() > self.InsertText(lp, data) > self.StartStyling(lp, 31) > self.SetStyling(ld, 14) #where 14 is the new style > self.StartStyling(es+ld, 31) > > All of the text after the newly styled text gets styled the same. > > When I use AddStyledText(), the styling of the added styled text is lost. If you have a lexer set then the styling will be overwritten by the lexer which has no way of knowing that the styling was set explicitly. Neil _______________________________________________ Scintilla-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scintilla-interest
