Convert old function RVA_ConvertToTwips

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
daniel74
Posts: 3
Joined: Tue Dec 15, 2020 10:08 am

Convert old function RVA_ConvertToTwips

Post by daniel74 »

Hi, we have just updated to a newer version of TRichview/TScaleview.

Almost everything worked without a problem but got stuck when trying to convert RVA_ConvertToTwips(Self);


Any ideas how to best replace the procedure?

unit RichViewActions;

procedure RVA_ConvertToTwips(Form: TComponent);
var
i: Integer;
begin
for i := 0 to Form.ComponentCount - 1 do
if Form.Components is TrvCustomAction then
TrvCustomAction(Form.Components).ConvertToTwips;
end;


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

Re: Convert old function RVA_ConvertToTwips

Post by Sergey Tkachenko »

This function still exists, but it has additional TRVStyle parameter.

For TSRichViewEdit, call

RVA_ConvertToTwips(Self, SRichViewEdit1.RichViewEdit.Style);

And consider using EMU instead. All new RichViewActions demos were switched from twips to EMU.
Read more about twips and EMU here: https://www.trichview.com/help/idh_type ... units.html
daniel74
Posts: 3
Joined: Tue Dec 15, 2020 10:08 am

Re: Convert old function RVA_ConvertToTwips

Post by daniel74 »

Will have a look.

Now it is working. Thanks for help.
Post Reply