Board index » delphi » Confused over forms at different resolutions

Confused over forms at different resolutions

I would appreciate it if someone could explain to me what's happening with
the following problem.

a) I create a form on my high-resolution NT system
b) I put some labels on it with a font size of 8
c) I run the program on a Win98 machine at a lower resolution

What I am EXPECTING is that the form (and everything in it) to look
bigger.
However, what I'm seeing is that the labels no longer fit on the form.
After doing some experiments to see the underlying property values,
I discovered that on the lower resolution screen, the font size changed
to 7. Why is this happening and how do I stop it?

I have disabled scaling, by the way. I have no problem with the form being
bigger but I want everything to stay visible and not be cut off.

I experimented with anchors and found that I had to leave LEFT and TOP
enabled
otherwise things go to hell.

Thanks,
David Jameson
--

________________________
David H Jameson
Digiportal Software LLC

http://www.digiportal.com

 

Re:Confused over forms at different resolutions


Quote
In article <86ilhl$n...@bornews.borland.com>, David Jameson wrote:
> I experimented with anchors and found that I had to leave LEFT and TOP
> enabled
> otherwise things go to hell.

Are you sure that Form.Scaled=False? You are describing a symptom that
occurs when Scaled=True and you deploy on a system that does not have the
same large font/small font setting.

I got bit by this so frequently that I placed a default form in the
repository with Scaled=False.

Before you do this yourself, I have to say that I no longer do this since
setting a default form prevents me from adding Frames in Delphi 5 (a bug I
reported a while back).

 Mike Orriss (TeamB)
 (Unless stated otherwise, my replies relate to Delphi 4.03/5.00)
 (Unsolicited e-mail replies will most likely be ignored)

Re:Confused over forms at different resolutions


Mike,
Thanks for the response....yes, I'm sure about the scaling - we were
actually trying it with and without to see if we could determine exactly
what was happening.

I'm wondering what you meant by the comment
  "deploy on a system that does not have the same large font/small font
setting."

Are you talking about the "font size" stuff in the Settings of the Windows
control panel?
If so, is the problem I'm seeing related to TLabels being "modified" by that
setting? If
so, is there a way to stop that from happening? That would solve our problem
if that's
in fact what's going wrong.

Thanks,

David Jameson

"Mike Orriss (TeamB)" <m...@3kcc.co.uk> wrote in message
news:VA.000015fc.3d2629ca@mikemain...

Quote
> In article <86ilhl$n...@bornews.borland.com>, David Jameson wrote:
> > I experimented with anchors and found that I had to leave LEFT and TOP
> > enabled
> > otherwise things go to hell.

> Are you sure that Form.Scaled=False? You are describing a symptom that
> occurs when Scaled=True and you deploy on a system that does not have the
> same large font/small font setting.

> I got bit by this so frequently that I placed a default form in the
> repository with Scaled=False.

> Before you do this yourself, I have to say that I no longer do this since
> setting a default form prevents me from adding Frames in Delphi 5 (a bug I
> reported a while back).

>  Mike Orriss (TeamB)
>  (Unless stated otherwise, my replies relate to Delphi 4.03/5.00)
>  (Unsolicited e-mail replies will most likely be ignored)

Re:Confused over forms at different resolutions


Quote
In article <86kfge$oh...@bornews.borland.com>, David Jameson wrote:
> Are you talking about the "font size" stuff in the Settings of the Windows
> control panel?

Yes

Quote
> If so, is the problem I'm seeing related to TLabels being "modified" by that
> setting? If
> so, is there a way to stop that from happening? That would solve our problem
> if that's
> in fact what's going wrong.

If Form.Scaled=False, that shouldn't be causing the problem. You do have to
layout your form so that there is enough room if Windows is set to large fonts
though.

One other thing to check is your typeface, as Windows will change to the
nearest match that it has available.

 Mike Orriss (TeamB)
 (Unless stated otherwise, my replies relate to Delphi 4.03/5.00)
 (Unsolicited e-mail replies will most likely be ignored)

Re:Confused over forms at different resolutions


Quote
David Jameson wrote:

> I experimented with anchors and found that I had to leave LEFT and TOP
> enabled
> otherwise things go to hell.

        David, one useful trick is to change the Alignment property of the
TLabels (not to be confused with the Align property).  With this
property, you can control whether the labels grow to the left or to the
right.

        HTH,

        -Craig

--
Craig Stuntz                    cstuntz@no_spam.vertexsoftware.com
----------------                -----------------------------
Delphi Developer                Vertex Systems Corporation
& Cat Wrangler                      http://www.vertexsoftware.com

Re:Confused over forms at different resolutions


Thanks for everyone who replied - this feedback has solved our problem - we
were baffled for a long time and it never occured to any one that the
control panel font size settings was the problem!

David Jameson

Quote
"Craig Stuntz" <cstuntz@no_spam.vertexsoftware.com> wrote in message

news:388E367A.54E90072@no_spam.vertexsoftware.com...
Quote
> David Jameson wrote:

> > I experimented with anchors and found that I had to leave LEFT and TOP
> > enabled
> > otherwise things go to hell.

> David, one useful trick is to change the Alignment property of the
> TLabels (not to be confused with the Align property).  With this
> property, you can control whether the labels grow to the left or to the
> right.

> HTH,

> -Craig

> --
> Craig Stuntz cstuntz@no_spam.vertexsoftware.com
> ---------------- -----------------------------
> Delphi Developer Vertex Systems Corporation
> & Cat Wrangler http://www.vertexsoftware.com

Re:Confused over forms at different resolutions


"David Jameson" <da...@nospam.digiportal.com> schreef in bericht
news:86n402$q0c7@bornews.borland.com...

Quote
> Thanks for everyone who replied - this feedback has solved our problem -
we
> were baffled for a long time and it never occured to any one that the
> control panel font size settings was the problem!

The control panel font size setting could actually not be the problem, cause
you turn the usage of that setting on and off by setting the Scaled
property! If Scaled is true the font size setting is taken into account, if
Scaled is false it's not. So, however your problem is solved by setting the
font size on both machines to the same value, the problem itself remains.
Maybe the problem has to do with the font you are using? Try copying the
font from one machine to the other (not just check whether they are the same
but really copying) and see if the problem still occurs.

Regards Camiel

Other Threads