TDBAdvGrid High-DPI multi-monitor support

Hi,

When dragging a form from a 5K monitor to a 1920x1080 monitor the text in the grid appears to resize properly but the column width's don't. Is there anything that I can do about this or it just the way it works?

FYI I have posted some screenshots about this and a related problem on Stack Overflow

Thanks

Steve

Is this with TMS VCL UI Pack v11.0.3.0?

Hi Bruno,

Thanks for responding so quickly. Yes it is.

Steve

It seems a change in the underlying Delphi 11.2 VCL causes this.
We implemented a solution for this specific Delphi 11.2 case. The next update will address this.

Hi Bruno, Thank you for sorting the column width issue with the grid so quickly. I'm still having some issues with this though. I have a little test project to show the problems
HighDpiTest_2023-03-02.zip (30.3 KB)

I'm running Delphi 11.2 on a 5 K monitor with a second HD monitor. The Delphi form designer H-DPI is set to automatic (192). I have a main form, a frame and a datamodule. On the main form I have a TDBNavigator, TDBGrid, TDBAdvNavigator and TDBAdvGrid connected to a memory table in the datamodule. I have exactly the same components in the frame and the frame is parented on to the main form at the bottom. When I start the application everything is fine. I drag the form to the second monitor, it's not quite right and I drag the form back to the main monitor and the layout doesn't recover. I'm not sure if this is a problem with Delphi and frames or it is an issue with the components. What do you think? I'll raise it with Embarcadero if you think it is a problem with Delphi.

Here is the form when I first run it on the 5K monitor (the TMS components are on the right and the frame is on the bottom). Everything looks fine

Here's what it looks like on the second monitor. Notice the TDBNavigator and the TAdvDBGrid on the frame don't look right.
image

Now I drag it back to the main form and theTDBNavigator and the TAdvDBGrid on the frame still don't look right. But the TDBAdvNavigator and the TDBGrid are fine.

We checked this and it appears to be an issue, at least in Delphi 11.2 with frames.
For components on the frame, the component ChangeScale() method is being called with parameters 1:1 and when it is used directly on the form it is called with the proper DPI values. When ChangeScale() is called with incorrect parameters, we can't properly scale fonts at startup time or when moving form between monitors.
We will double-check this with 11.3 as soon as we can.