Hi,

How does Lazarus (or any Lazarus written app) handle different screen dpi settings? The standard Button width under Windows, with a standard 96dpi is 75x25 pixels, and at 120dpi (125% bigger), it scales accordingly: +-94 pixels in width. Strangely enough the height stays at 25 pixels.

Not sure if there is support built into the controls or the LCL framework for this. What is the alternate solution, using a Ratio based on 96dpi. What is the default for other OS's?

eg:
 // Do this once at application startup
 gRatio := Screen.PixelsPerInch / 96;
 ...
 // We would need to set every controls width like this
 btnHelp.Width := Round(75 * gRatio);


Regards,
  - Graeme -

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to