TFormControlEditLink on High DPI


We are using TAdvStringgrid with a TFormControlEditLink.
On High DPI monitor the control is not scaledforPPI.
We've added in OnSetEditorProperties scaledforPPI for all the components in our control (Tedit, Tlistbox,...) on the panel. That works, but the size of the displayed form is not scaled? Can we add the scale for the form also?

Thanks Bram.

We traced & solved this issue. The next update will address this.

Ok, that would be nice!
Any idea when next update will be available?

Between now and Nov 12.
Being in lockdown makes this organizationally somewhat more difficult.

I'd like to come back to this in a moment.
Looks like this problem has gone away but is now back after some updates?

We are also looking for a possibility to adjust the position and dimensions of this custom-edit. Apparently the position can be determined, but only left & top. We only want to adjust the left (eg always left on the grid) top should follow the cell position. Can we fix this? we tried it in EditorSetEditorProperties, but then we always get the position of the previous action..

Line 24744 in AdvGrid:
if ((EditLink.PopupLeft <> -1) and (EditLink.PopupTop <> -1)) then
pt := Point(EditLink.PopupLeft,EditLink.PopupTop)
pt := ClientToScreen(Point(r.Left,r.Top));

Maybe can be modified to:
if ((EditLink.PopupLeft <> -1) and (EditLink.PopupTop <> -1)) then
pt := Point(EditLink.PopupLeft,EditLink.PopupTop)
else if (EditLink.PopupLeft <> -1) then
pt := Point(EditLink.PopupLeft,r.Top)
else if (EditLink.PopupTop <> -1) then
pt := Point(r.Left,EditLink.PopupTop)
pt := ClientToScreen(Point(r.Left,r.Top));

  1. We have applied your suggested improvement. This improvement will be in the next update.
  2. Wrt scaledforPPI, what Delphi version are you using now?
  1. Thanks for that!
  2. We are using Delphi 11.1
    To 'solve' the problem we have to do this:
    Not everything is okay with this 'solution' ex. Edit.width bigger than panel etc.

//EditLinkFormuleEditor: TFormControlEditLink;
//EditLinkFormulEditor.Control := PnlEditLink; //TPanel with child components

procedure TFrameFormules.EditLinkFormuleEditorSetEditorProperties
(Sender: TObject; Grid: TAdvStringGrid; AControl: TWinControl);
DPIScale: Single;
NewDPI: integer;
DPIScale := GetDPIScale(Self, Grid.Canvas);
NewDPI := Round(96 * DPIScale);

//for each component on PnlEditLink


It would help if we had a test project with which we can reproduce this here.
Does this use a frame somehow?
Did you try to call ScaleForPPI on this frame (or other container control you might use)?

The panel and the TFromControlEditLink are indeed located on a Frame (So we can simple re-use it where we want to..)
We will make some more tests.

If (WeCanFindASolution()) then

We have sent a test project by email.

I couldn't see an email
Are you sure there was no EXE file or other potentially harmful files included that could have triggered that this email was blocked?