TBRichViewEdit sup and super

General TRichView support forum. Please post your questions here
Post Reply
Thr33D
Posts: 9
Joined: Mon Apr 11, 2011 10:44 am

TBRichViewEdit sup and super

Post by Thr33D »

Hi,

I use a TBRichViewEdit and RTF. With a Stream I changend Letters high and down with s := '{\sub\fs22 '+vm+'\plain}';. That's works.

If I go with the cursor through the text I want to know when there is the formatting sup and super. Is there an easy way to find that out in order to undo the formatting?

My first idea was the "OnCurTextStyleChanged" after asking CurTextStyleNo, but that does not work, because the values ​​are different.

Can you help me?

Thank you.
Sergey Tkachenko
Site Admin
Posts: 17572
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

OnCurTextStyleChanged and CurTextStyleNo is the correct way.

For example, see Demos\*\Editors\Editor 2\
It does not work with sub/superscripts, but the idea is the same as for other text style properties.

RichViewActions use CurTextStyleNo as well (they do not use OnCurTextStyleChanged - they update themselves when the application is idle, but it makes sense only when using actions)
Post Reply