Hello Tom, Wednesday, March 1, 2006, 3:12:05 PM, you wrote:
> Hi All, > Has anybody come up with a way to allow the user to, say, bold a > selection of text based on their selection, rather than on the substance > of the text? With a rich text editor, this generally involves the use of > some sort of hidden characters, which would be identified start and end > points for that particular style. Anybody have any idea of how to > implement something like that with Scintilla? If it's any help to know, > I'm using the wxStyledTextCtrl wrapper. I use Scintilla like that but use the styles. It seems to work well. I have an offset that I subtract (to skip the predefined styles) then I 'OR' either $10 or $20 to represent bold or/and italic text, I tehn add the offset and put it back. Together I use 64 styles (values - offset) in groups of 16 - all set to the same font type: $00-$0f normal $10-$1f bold $20-$2f italic $30-$3f bold+italic If I have any colour/font changes I have to update all 64 styles. Here is a link to the beta of the application so you can see it in action: http://www.ApplePanic.com/downloads/rb/install.exe I hope this helps. BTW: You will have to do your own undo/redo/copy/cut/paste as the built-in ones destroy styles. -- Best regards, Anthony mailto:[EMAIL PROTECTED] _______________________________________________ Scintilla-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scintilla-interest
