After watching Ray Konopka’s brilliant presentation on Leveraging High DPI in VCL Applications, 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 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.
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?