Chad Johnson wrote:
I can't figure out how to change the background color of a range of text. I've tried and tried and tried and tried and tried and it just does not work at all. Could somebody give me an example of how to do this or if it's not possible just tell me.
I really need a response.
While it sounds like you are having a rough time, it would help if you gave some context... what approaches have you tried, what *did* happen even if they didn't work the way you want, etc.
As it happens, I can see that you made a "Scintilla Feature Request" that is presumably talking about this too.
Anyway, offhand (and assuming you are not writing or working with a lexer), the way I would do this would be pretty much like setting up Scintilla to work with a lexer: define the display and font attributes of a style or styles using SCI_STYLESETFORE, SCI_STYLESETBACK, SCI_STYLESETBOLD, etc. Then just do a SCI_STARTSTYLING followed by some number of SCI_SETSTYLING calls using "styles" you have defined above.
I have not tried doing "raw" use of the styling machinery like this, but this is about what it should look like. A refinement if you are going to define more than a couple of styles would be to define "common" attributes for the "magic" STYLE_DEFAULT, and then do a SCI_STYLECLEARALL to set all styles to these values - then use the "SCI_STYLESET*" calls to set the differences.
Robert Roessler [EMAIL PROTECTED] http://www.rftp.com _______________________________________________ Scintilla-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scintilla-interest
