On Wed, 19 Oct 2005, Tony Maro wrote:

> Alex Smirnov wrote:
> 
> > *Dear Friends!*
> > 
> > Ones more I ask you for some help. Help me please to understand how can I
> > get real height of any form window created by Lazarus? The matter is
> > trhat TForm.Height returns not a total Form height, but Form height minus
> > title bar height. Actually, in Lazarus TForm.Height is equal to
> > TForm.ClientHeight in Delphi.
> > 
> > So, ones more - I can't find any info about that. This problem is very
> > important for me.
> > 
> > *Best regards, Alexey.*
> 
> In Linux (and OSX?) the window manager is a separate thing, and
> interchangable, so the only metric we can reliably get is the clientheight.
> 
> I'm not sure what happens in Winblows.

The height of the Window title bar can be obtained in windows through 
the system metrics, just as the width of the scrollbars etc. In Delphi

- Height is the height of the window + the height of the title bar
- Clientheight is the available height of the window. 
  This becomes smaller for MDI Windows, as e.g. the menu 
  height is substracted from the height.

There are probably some other subtleties which I'm unaware of, but the 
above should be more or less correct.

Since Lazarus cannot offer a method to get the title bar height on all platforms
(notably Linux/Unix), the most sensible thing to do is to make 
Height=ClientHeight...


Michael.

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to