Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't scoll whole window

Status
Not open for further replies.

philrock

Programmer
Jan 29, 2004
109
US
I've recently written a simple Windows application using Delphi 7. I'm very new to Delphi – only started learning it about three weeks ago. The application runs and looks fine on the development computer, but when I tried it on my laptop, I could not scroll the full extent of the window. I ran the scroll bars from stop to stop and the whole scrolling range only covered about a third of the application's window. I noticed that the desktop on the development computer is set to small fonts, while the desktop on the laptop is set to large fonts. When I changed the laptop to small fonts, the app ran fine. Obviously, it's not acceptable to require users to change their desktop settings to be able to run my app. I tried setting the development computer to large fonts. I thought that maybe re-compiling with this desktop setting might change things. No dice. The app was messed up on the development computer both before and after re-compiling, when the desktop was set to large fonts. Any suggestions on how to fix this?
 
You could try to set the properties for
[tt]Position[/tt] to [tt]poDesktopCenter[/tt] and
[tt]Scaled[/tt] to [tt]False[/tt] (the default is [tt]True[/tt]).

To quote the help file:

Specifies whether the form is sized according to the value of the PixelsPerInch property.

Description

Scaled determines whether the form adjust itself to differences between the font used at design time and the current system font used by a system at runtime. If Scaled is true, the form resizes itself and all its child controls to maintain the relationship between the size of controls and the height of text displayed in the default font. If Scaled is false, no such resizing occurs.

By setting Scaled to true, the form can adjust to fonts that are not scalable (that is, fonts that only supply discrete point sizes) or to differences such as forms designed using small fonts at design time that are run on systems that use large fonts.

The degree of resizing is determined by the PixelsPerInch property, which measures the proportion of the font on the system used when designing the form.


I find my apps running on different machines and OS versions (Win9x and WinXP) all suffer from Win font variations depending on the user. Normally, I set the [tt]Scaled[/tt] property to [tt]FALSE[/tt] and all users seem happy!

Cheers


Chris ;-)
 
Chris,

That seems to take care of the problem. Thanks a million!

Philrock
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top