Q. What's the relationship between Font.Height and TextHeight please?
A. http://docwiki.embarcadero.com/Librarie ... ont.Height
Q. Width and ClientWidth?
A. Width - this should be the *overall* width of an object in terms of the screen.
ClientWidth - this is effectively the *internal* width of an object - the area that can contain child controls.
Q. Height and ClientHeight?
A. Same Width and ClientWidth.
Q. What does a negative value do to Font.Height?
A. "If the value is negative, the internal leading that appears at the top of each line of text is not measured. If the value is positive, Height represents the height of the characters plus the internal leading."
http://docwiki.embarcadero.com/Librarie ... ont.Height
Q. Where can I read more about the many other dialog objects and their properties please?
A. Limited info here: http://www.mjtnet.com/manual/index.html ... bjects.htm
Thanks!
Dialog Text
Moderators: JRL, Dorian (MJT support)
-
- Macro Veteran
- Posts: 260
- Joined: Fri Apr 15, 2005 8:32 am
Dialog Text
Last edited by fightcancer on Sat Jun 07, 2014 10:08 pm, edited 3 times in total.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Dialog Text
Don't know how well I can answer those questions but let me try:
Width - this should be the *overall* width of an object in terms of the screen.
ClientWidth - this is effectively the *internal* width of an object - the area that can contain child controls.
Same for Height vs ClientHeight
All the controls and dialogs are inherited from the Delphi VCL (Visual Component Library). So for lower level questions like this the best thing would be to search the Delphi VCL documentation:
http://docwiki.embarcadero.com/RADStudi ... L_Overview
Try searching there.
Here's the info on TFont.Height:
http://docwiki.embarcadero.com/Librarie ... ont.Height
And I quote:
I suggest you do what the rest of us programmers do - experiment. Set it negative, see what happens, set it positive, see what happens, keep setting until you get the appearance you like.
Width - this should be the *overall* width of an object in terms of the screen.
ClientWidth - this is effectively the *internal* width of an object - the area that can contain child controls.
Same for Height vs ClientHeight
All the controls and dialogs are inherited from the Delphi VCL (Visual Component Library). So for lower level questions like this the best thing would be to search the Delphi VCL documentation:
http://docwiki.embarcadero.com/RADStudi ... L_Overview
Try searching there.
Here's the info on TFont.Height:
http://docwiki.embarcadero.com/Librarie ... ont.Height
And I quote:
No, I don't really know what they mean by "internal leading". Perhaps that's the spacing. I'm just anticipating your next question which I likely don't have the answer to.If the value is negative, the internal leading that appears at the top of each line of text is not measured. If the value is positive, Height represents the height of the characters plus the internal leading.
I suggest you do what the rest of us programmers do - experiment. Set it negative, see what happens, set it positive, see what happens, keep setting until you get the appearance you like.

Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Macro Veteran
- Posts: 267
- Joined: Mon Sep 27, 2010 8:57 pm
- Location: Seattle, WA
Re: Dialog Text
Different versions of Windows handle dialog borders a little bit differently.
By setting ClientWidth and ClientHeight there is more consistent dialog size between OS's.
By setting ClientWidth and ClientHeight there is more consistent dialog size between OS's.