Re: Delphi apps using Windows Large Fonts
From: Jan Derk (none_at_none.none)
Date: 02/02/05
- Next message: Hrvoje Brozovic: "Re: Restoring Sanity to this group"
- Previous message: Alan Garny: "Re: Restoring Sanity to this group"
- In reply to: JED: "Re: Delphi apps using Windows Large Fonts"
- Next in thread: Colin Wilson: "Re: Delphi apps using Windows Large Fonts"
- Reply: Colin Wilson: "Re: Delphi apps using Windows Large Fonts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 02 Feb 2005 11:49:37 +0100
JED wrote:
>>In D4, D5 , D6 & D7 you do not want to to have anchors to the right
>>and bottom on sizable forms. All will look good on your development
>>computer, but the controls will be mispositioned if your customer
>>runs your application at a different font size.
>>
>>Q1083
>>Q1113
>>Q2127
> So how are people anchoring there buttons on sizeable forms then?
> Do they set the anchors in the OnCreate?
You leave the forms borderstyle at bsDialog at design time. In the
form's onCreate event you then add:
BorderStyle := bsSizeable;
If you do it like that you can put your anchors right and bottom
aligned. If you don't, many of your customers will look at one ugly
window or have controls outside the visible window area.
The bug only appears if you set TForm.Position to some setting where
Windows decides on the size of your resizeable window like poDefault. My
guess is that Delphi does not apply the scaling factor when compensating
for the new form width and height settings when positioning right and
bottom aligned components, which is why setting the resizeable
borderstyle in oncreate works. But this is all from the top of my head
digging into memories from years ago.
It reminds me of another issue though: which genius decided that having
poDesigned as default for TForm.Position is a good thing?
Jan Derk
- Next message: Hrvoje Brozovic: "Re: Restoring Sanity to this group"
- Previous message: Alan Garny: "Re: Restoring Sanity to this group"
- In reply to: JED: "Re: Delphi apps using Windows Large Fonts"
- Next in thread: Colin Wilson: "Re: Delphi apps using Windows Large Fonts"
- Reply: Colin Wilson: "Re: Delphi apps using Windows Large Fonts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]