UI Plugin

delphi 10.3.3
Hydra: 6.2.101.1237.
RO/DA:10.0.0.1463
host: vcl
plugin:fmx

I created a fmx VisualPlugin and vcl host use “ShowParented” to a TPanel. In normal scaling it can show correctly.
if the windows set to scaling to 150%, it only show top part of it (in fmx plugin all control align already set to scale).

How to let plugin show correctly at a scaling bigger than 100%.

joe

Hi,

Looks like, I can’t reproduce any issues with the CrossPlatform sample at 150% dpi:

Can you attach a simple testcase that reproduces your issue, pls?
you can drop email to support@ for keeping privacy

I already sent the support please check email.
my windows : Windows 10
The edit box and Button in the recetangle is the fmx component.

Below one is correct on 100%
2021-02-03_19h45_22

This one is 150%
2021-02-03_19h47_04

Hi,

you need to recalculate Width/Height in OnResize event:

I’ve added two events:

var
  a,b: Double;

procedure TFmxVPForm_Login.HYFMXVisualPluginCreate(Sender: TObject);
begin
  a := Rectangle1.Position.X;
  b := Rectangle1.Position.Y;
end;

procedure TFmxVPForm_Login.HYFMXVisualPluginResize(Sender: TObject);
begin
    Rectangle1.Position.X := a /Self.Handle.Scale;
    Rectangle1.Position.Y := b /Self.Handle.Scale;
    Rectangle1.Width := (Width - 2*a)/Self.Handle.Scale;
    Rectangle1.Height := (Height - 2*b)/Self.Handle.Scale;
end;

because you have a control located not at (0,0).