Alan Rose said:

> Third party resizing components aside. I would be keen to hear from anyone
> how they dealt with resizing issues between large and small fonts. The
> typical problem you see is a form border covering components placed at the
> edge of the form when viewed on a PC using large fonts.

I solved this completly by doing some extra work during the form scaling
process. Most of the automatic scaling works perfectly, and once I got my
head around how it actually worked got all of our customised components
scaling perfectly as well. The only remaining issue is that Delphi, by
design, does not scale the actual form, only all the components on it.

The solution was to hack the TCustomForm.ReadState method and ensure that as
well as the controls, fonts and other stuff being scaled depending on the
design font vs run time font sizing, the actual form dimentions were scaled
as well.

This is not an ideal solution, but I could see no clean way of achieving
form scaling during component read is a simple and clean manner. The basic
issue is that there is no place between the reading of the component
properties and the scaling flags being cleared that you can override any
behaviour.

Personally I have a huge itch to bash who ever at Microsoft decided to link
the screen resolution with default font size preference. Would it have been
to hard to have a configurable DPI setting for your screen? Unfortunately we
have to deal with the DPI changes based on font height changes and make
guess as to what that means for forms.

Cheers, Max.

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to