AdvToolPanel - dual monitor issues

When using dual monitor configuration with different resulutions, some components behave incorrectly.

  1. Take AdvToolPanel and dock it into another AdvToolPanelTab in Runtime (using mouse or with ManualDock). Then move the form to another monitor - and your toolpanel will just disappear. This is because the forthcoming contructor of TToolPanel doesn't set FCalcOpenWidth.
    As a workaournd I modified TAdvToolPanelTab.InsertPanel as follows:

with Panels.Add do
begin
Caption := APanel.Caption;
ImageIndex := APanel.ImageIndex;
Panel := APanel;
OpenWidth := APanel.OpenWidth;
UpdatePanels(-1);
FCalcOpenWidth := OpenWidth;
end;

  1. When moving a form between monitors, it double scales font size of the panel.
    Not sure if this is correct, but removing font size mofification code from TAdvToolPanelTab.ChangeScale fixes the problem.

  2. You should do something with scaling CaptionHeight. I can see in your code that sometimes you consider DPIScale, but it is not enough. Its real size is not changed and if you e.g. put a control into the panel, it may overlap its caption. See my example.

  3. Although I'm never using manual docking with this component, it behaves ugly with 2 monitors, e.g. if your form is on the primary monitor, but you are moving the floating AdvToolPanel on the secondary monitor, it draws a frame on the primary monitor.
    demo.zip (1.3 KB)

What Delphi version do you use? We retested this here with v12.1.

  1. I could see this issue and we applied this improvement.
  2. I could not see such issue here.
  3. In your example, your panel did not contain a control? We added a control here and could see an issue and fixed this.
  4. I could not see this here (with Delphi 12.1)

Sorry, I didn't mention Delphi version. It is 10.4.2

  1. It contains a control. In my example, it is AdvPanel1 (with Align set to alTop).

Unfortumately I'm unable to record a dual monitor video to display its behavior, but I will try if you still can't see the problem.