I am using High DPI option in Delphi 10 Seattle project. The controls (buttons, labels, check box) on forms scale well on different DPI setting. These controls were drop to form at design time.
However, I have some TButton
control that I created at runtime. These runtime created button doesn't scale and honour the monitor's DPI setting. For example, a design time TButton
with height of 25
at design time scale to 31
. But the runtime created TButton
control doesn't scale from 25
to 31
.
I may do extra calculate on the left, top, width and height on runtime created TButton
control but that would be tedious. Is there any ready solution available in Delphi
that allow us to scale according to monitor's DPI?