Board index » delphi » Look the same with Large or Small fonts?

Look the same with Large or Small fonts?

I've got a program that is in the final stages of beta, and I
just discovered that everything is vastly different on systems
with Large Fonts selected, vs. Small Fonts.  I need to know a
good/easy way to make it look basically the same on both.

I designed all of the forms on a system with Large Fonts.  Just
about everything is 80% the size I designed it when run on a
snall fonts system.  For instance, I have a form that is 1024
pixels wide.  I have a component on there that is nearly as wide
as the form.  The number of pixels wide should be approximately
1000.  However, when I design it with Large fonts, the component
is only about 800 pixels wide, even though it nearly fills the
form.  When it is displayed with small fonts, it is only 80% as
wide as the form.  I assume that if I design the form with small
fonts, everything will be 1.25 times as wide on a system with
large fonts, and run off the form.

Everything on the form is 20% closer to the top and to the left
under the small fonts system, so the right 20% and bottom 20% of
each form is blank when run under small fonts.

I need a good (and easy, if possible) way to fix this problem.

(It has 37 forms, and hundreds of visual components.)  
TIA
Jud McCranie

 

Re:Look the same with Large or Small fonts?


Jud McCranie <jud.mccra...@mindspring.com> skrev i en
nyhedsmeddelelse:YbckON1OiRkJkVN=r=+xkDGXW...@4ax.com...

Quote
> I designed all of the forms on a system with Large Fonts.

That's good.

Quote
> I need a good (and easy, if possible) way to fix this problem.

Set the forms Scaled property to False.

Re:Look the same with Large or Small fonts?


Hi,

Well I don't know the answer to the small versus Large fonts problem when it
comes to control captions, and people more skilful in Delphi than I am have
declared themselves perplexed by it too, however when it comes to
positioning items relative to screen size so they always look the same
regardless of resolution I tend to use the clientwidth & clientheight
properties with a mathematical equation as in:-

Panel1.Width := ((ClientWidth div 100) *  80);  {make the panel 80% of the
form's width}
Panel1.Height := ((ClientHeight div 100) * 20);  {make the panel 20% of the
form's height}

Obviously you'd follow on from there by setting the Left and Top positions
in a similar fashion to place it in a relatively fixed location, and to
repeat the same on ALL items would place it in procedure invoked whenever
the form size changes.

I seem to recall having seen a FAQ or TI on the Borland web-site about how
to do all this, so it might be worth grabbing that to see if they've got a
more elegant method than I use.

--
Keith

ALL SPAM MAILERS WILL BE SENT COPIES OF SPAM
RECEIVED FROM OTHER UNSOLICITED SOURCES.

*********************************************************************

Quote
Jud McCranie <jud.mccra...@mindspring.com> wrote in message
> I designed all of the forms on a system with Large Fonts.  Just
> about everything is 80% the size I designed it when run on a
> snall fonts system.  For instance, I have a form that is 1024
> pixels wide.  I have a component on there that is nearly as wide
> as the form.  The number of pixels wide should be approximately
> 1000.  However, when I design it with Large fonts, the component
> is only about 800 pixels wide, even though it nearly fills the
> form.  When it is displayed with small fonts, it is only 80% as
> wide as the form.  I assume that if I design the form with small
> fonts, everything will be 1.25 times as wide on a system with
> large fonts, and run off the form.

> Everything on the form is 20% closer to the top and to the left
> under the small fonts system, so the right 20% and bottom 20% of
> each form is blank when run under small fonts.

> I need a good (and easy, if possible) way to fix this problem.

Re:Look the same with Large or Small fonts?


The main form object has a propperty called AutoSize or AutoScale or
something (at least in D4).
Try to set it true.
Quote
Jud McCranie wrote:

> I've got a program that is in the final stages of beta, and I
> just discovered that everything is vastly different on systems
> with Large Fonts selected, vs. Small Fonts.  
> ...
> ...
> Everything on the form is 20% closer to the top and to the left
> under the small fonts system, so the right 20% and bottom 20% of
> each form is blank when run under small fonts.

Re:Look the same with Large or Small fonts?


"Keith Anderson" <_spamnotorelse_nosredn...@freewayuk.com>
wrote:

Quote
>Well I don't know the answer to the small versus Large fonts problem

Someone told me about using scaled := false on each form, and
that solves my problem.

Jud McCranie

Re:Look the same with Large or Small fonts?


Quote
"J.Hansen" <No_s...@ddre.dk> wrote:
>The main form object has a propperty called AutoSize or AutoScale or
>something (at least in D4).
>Try to set it true.

According to the help file: "When AutoSize is True, the control
resizes automatically when its contents change.", so that
wouldn't solve my problem.  However, scaled := false does.

Jud McCranie

Other Threads