ApplyStyleConversion not working?

General TRichView support forum. Please post your questions here
Post Reply
martindholmes
Posts: 131
Joined: Mon Aug 29, 2005 12:03 pm

ApplyStyleConversion not working?

Post by martindholmes »

Hi there,

I'm trying this relatively simple task with a TRichViewEdit:

rve.ApplyStyleConversion(TEXT_BOLD);

It has no effect. Can anyone suggest why that might be? I've gone through all the options and settings I can find, but I can't see what's preventing this from working.

All help appreciated,
Martin
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

ApplyStyleConversion calls OnStyleConversion event for each selected text item, passing its parameter (TEXT_BOLD in your case) as one of parameters to this event.
If you do not process this event, ApplyStyleConversion will do nothing. Example can be found in Demos\Editors\Editor 2\
martindholmes
Posts: 131
Joined: Mon Aug 29, 2005 12:03 pm

Post by martindholmes »

Doh! Thanks Sergey. Missed the obvious there.

Cheers,
Martin
Post Reply