TNotebook: DPI scaling breaks anchoring
- Lazarus/FPC Version: Lazarus 3.6 (rev lazarus_3_6) FPC 3.2.2 x86_64-win64-win32/win64
- Operating System: Win7, Win10
- CPU / Bitness: 64bit
What happens
When the application is used on an other computer with dpi scaling other then on the computer where the program was compiled, then the components placed on a TNotebook can not be anchored, but bahave like the default anchoring left/top.
Also a workaround using the form's OnResize event and manually placing the controls fails for the non-visible page. I.e. when changing to the hidden page, the dimensions wern't updated. It gets "repaired", though, when I resize the Form. Seems the internal values were ok, but not updated properly.
See forum thread: https://forum.lazarus.freepascal.org/index.php/topic,69143.msg536562.html#msg536562
What did you expect
The controls placed on the Notebook should resize due to the four anchors left/top/right/bottom that are set and controls with anchors top/right should move when resizing the form. Both fails when the designtime ppi and runtime ppi are different (Binary ran on a different computer).
Steps to reproduce
Attached in the forum thread there is a minimum example. To see the issue the program has to be compiled and then the exe has to be run on a system with different dpi settings. https://forum.lazarus.freepascal.org/index.php?action=dlattach;topic=69143.0;attach=74388