Page 1 of 1

Convert old function RVA_ConvertToTwips

Posted: Fri Jan 08, 2021 1:07 pm
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

Re: Convert old function RVA_ConvertToTwips

Posted: Fri Jan 08, 2021 4:06 pm
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

Re: Convert old function RVA_ConvertToTwips

Posted: Mon Jan 11, 2021 7:27 am
by daniel74
Will have a look.

Now it is working. Thanks for help.