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 » Thu Sep 08, 2005 12:52 pm

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: 14779
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Thu Sep 08, 2005 8:28 pm

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 » Mon Sep 12, 2005 3:21 pm

Doh! Thanks Sergey. Missed the obvious there.

Cheers,
Martin

Post Reply