[Lazarus] AdjustClientRect or GetLogicalClientRect: which one to override?

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Mar 24 19:53:00 CET 2013


On Sun, 24 Mar 2013 12:19:24 +0100
Bart <bartjunk64 at gmail.com> wrote:

>[...]
> Then the compiler told me (well, it did before, but I didn't notice)
> that I forgot to add the override to AdjustClientRect. I fixed that
> (and got rid of the overridden GetLogicalClientRect), and this also
> works.
> 
> So, here's my question: which of these two methods is the "right" one
> to override in this example? And what is the other method intende for?

The LCL uses the output of GetLogicalClientRect as input for
AdjustClientRect.

AdjustClientRect:
http://wiki.freepascal.org/Autosize_/_Layout#AdjustClientRect

GetLogicalClientRect:
http://wiki.freepascal.org/Autosize_/_Layout#Scrolling

So, you can use either AdjustClientRect or the ChildSizing properties.

Mattias




More information about the Lazarus mailing list