Board index » delphi » Window Size with different Res/Font sizes?

Window Size with different Res/Font sizes?

A silly question, but a slightly vexing one:

I've created a form with Scaled set to false as has been directed.  The
form looks fine in both small and large fonts at various resolutions.  

The problem:  on my tester's machine, large fonts at 800x600, the form
appears slightly smaller than designed, which means a scroll bar on the
right-hand side.  Any way to prevent this?  Something in the FormCreate
method, perhaps?

Thanks

Jim Stanley
Jacobs Engineering

 

Re:Window Size with different Res/Font sizes?


On Wed, 28 Jul 1999 14:30:04 -0700, "jim.stanley"

Quote
<jim.stan...@jacobs.com> wrote:
>I've created a form with Scaled set to false as has been directed.  The
>form looks fine in both small and large fonts at various resolutions.  

>The problem:  on my tester's machine, large fonts at 800x600, the form
>appears slightly smaller than designed, which means a scroll bar on the
>right-hand side.  Any way to prevent this?  Something in the FormCreate
>method, perhaps?

In my opinion, setting Scaled to False and hoping for the best is not
a good approach to solving the problem. Instead, you should
dynamically resize and reposition the controls on the form in response
to the font size setting. (If it's a non-resizable dialog, you can do
it in the form's OnCreate event handler; if it's a resizable window,
you can do it in the OnResize event handler.) You can either do the
work yourself, or use any of a number of components that handle the
task automatically.

-Steve

Re:Window Size with different Res/Font sizes?


Quote
"jim.stanley" <jim.stan...@jacobs.com> wrote:
>I've created a form with Scaled set to false as has been directed.  The
>form looks fine in both small and large fonts at various resolutions.  

>The problem:  on my tester's machine, large fonts at 800x600, the form
>appears slightly smaller than designed, which means a scroll bar on the
>right-hand side.  Any way to prevent this?  Something in the FormCreate
>method, perhaps?

I just use the following for forms in the Object Inspector.

AutoScroll = False
Font = Arial,8  (TrueType)
PrintScale = poProportional
Scaled = False

I design in small fonts (PixelsPerInch = 96). Then verify in large
fonts.

Regards,
Chris Roberts

Re:Window Size with different Res/Font sizes?


Hi!

Yes, I use the same settings, and since four years I never had problems with
overlapping controls, too large labels etc. on various machines (approx. 90
machines, all different hardware and screen settings). From my point of
view, this is the only thing to set (except BorderStyle set to bsSingle for
fixed forms, sometimes).

Greetings,

        Timo

www.neveprise.de m...@neveprise.de

Other Threads