trichview.com

trichview.support




AVs every time I try to change style


Return to index


Author

Message

Martin Holmes

Posted: 11/26/2003 16:45:20


Hi there,


I'm trying to use a TRichViewEdit in the simplest possible way: add text

to it, then change the style of selected text. I'm using Unicode

settings. Adding text to the component works fine, but as soon as I

select some text and try to change the style by setting it to one of the

styles in my associated TRVStyle, I get an AV. This is all the code I have:


procedure TfrmMain.ChangeStyle;

begin

   rveMain.ApplyTextStyle(4);

   rveMain.Format;

end;


procedure TfrmMain.btnAddTextClick(Sender: TObject);

begin

   rveMain.AddNLWTag('This is a test project. ',

               0, -1, -1);

   rveMain.Format;

end;


procedure TfrmMain.FormClose(Sender: TObject; var Action: TCloseAction);

begin

   rveMain.Clear;

end;


procedure TfrmMain.btnTSTClick(Sender: TObject);

begin

   ChangeStyle;

end;


I'm using Delphi 5 on Windows 2000, and I have Unicode set to True for

all text styles. This is driving me nuts. Any ideas?


Cheers,

Martin





Powered by ABC Amber Outlook Express Converter