Recent

Author Topic: LCL positioning bypass auto scale  (Read 612 times)

mercury

  • Full Member
  • ***
  • Posts: 154
LCL positioning bypass auto scale
« on: October 22, 2020, 05:09:06 pm »
Here is the problem I encountered:
  1. the program is set Application.Scaled := True
  2. now I want to set a control's position in fixed values (not scaled), but also keep other values in the lfm be scaled.
  3. do not want to calculate the values be set with ScaleX or ScaleY, since these values are integers, which means the calculation is not pixel accurate.

Searched everywhere in the website. Seems it's either all scaled or no scale at all.
So I'm looking a method to bypass this auto scale.

Any comments are appreciated.

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: LCL positioning bypass auto scale
« Reply #1 on: October 22, 2020, 05:46:53 pm »
Set Scaled of the control to false

mercury

  • Full Member
  • ***
  • Posts: 154
Re: LCL positioning bypass auto scale
« Reply #2 on: October 22, 2020, 06:15:56 pm »
Set Scaled of the control to false

That will make all child controls not be scaled.

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: LCL positioning bypass auto scale
« Reply #3 on: October 22, 2020, 06:28:50 pm »
Please explain what you want to achieve. In my eyes it not a good idea to unscale the parent and hoping that scaled children will lead to a good result: Suppose a panel 300 pixels wide, containing an Edit 200 pixels wide (at 96ppt). Running that at 192 ppi (200%) the width of the unscaled panel will remain at 300 px, but the width of the scaled edit will increase to 400 px, i.e. it will reach beyond the limits of the panel.

 

TinyPortal © 2005-2018