MathiasBurbach 0 Posted July 18, 2022 Hello Folks! After watching Ray Konopka’s brilliant presentation on Leveraging High DPI in VCL Applications at the ADUG symposium, we thought it is time to move our project to Delphi 11 and use TImageContainer and TVirtualImageList components. Our customer suggested to use the Google icons 1 that are available in different resolutions under the Apache License scheme. The icons are scaling well in toolbars, bit buttons and Delphi’s own DB navigator. What we did not expect but are witnessing is problems with right anchored labels. Right anchored controls move nicely to the new DPI setting of the second screen and back to the original 96 dpi of the first screen. But labels move out and not back. The second screen is set to of 150% scaling. The source code is available for download from here. For those not having Delphi 11 the executable is available for download from here. If I move the label into a panel, align the label left and the panel to the right it is working too. At this stage it seems I need to calculate the left position of the right aligned label each time TFrom.OnAfterMonitorDpiChanged is triggered. That can’t be true. Any ideas how to trick Delphi into doing the right thing? Salut, Mathias Share this post Link to post
Uwe Raabe 2057 Posted July 18, 2022 Hello Mathias, 4 hours ago, MathiasBurbach said: That can’t be true. At least it is not intended, but as you have a reproducible test case you should file a report in QP. Regards Uwe Share this post Link to post
Anders Melander 1784 Posted July 18, 2022 Do you have AutoSize=True on the labels? Share this post Link to post