Using OnDrawStyleText with ScaleRichView

Public forum for discussing TScaleRichView (shareware addon to TRichView providing WYSIWYG editing)
Post Reply
DavidRM
Posts: 90
Joined: Mon Aug 29, 2005 5:18 pm
Location: Tulsa, OK
Contact:

Using OnDrawStyleText with ScaleRichView

Post by DavidRM » Tue Jun 07, 2016 10:24 pm

Is it possible to use the RVStyle.OnDrawStyleText event with SRV?

Are there special issues that have to be dealt with?

Thanks.

-David

Sergey Tkachenko
Site Admin
Posts: 13579
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Wed Jun 08, 2016 7:32 am

Before SRV v7 - no.
In version 7 and newer - yes.
However, you cannot simply use TextOut or similar simple methods to draw text, because SRV positions each character manually.
You must use Draw method of a text style to draw text.

You can see the demo Demos\RVDemos\Assorted\Custom Draw\CustomDraw\

DavidRM
Posts: 90
Joined: Mon Aug 29, 2005 5:18 pm
Location: Tulsa, OK
Contact:

Post by DavidRM » Wed Jun 08, 2016 7:54 pm

Ah, OK. I see I will need to update my SRV (I'm still in v6.1.3).

Thanks.

-David

Post Reply