Behavior of LCL Client Area (was: win32 development)
aj_genius at hotmail.com
Tue Sep 24 23:33:58 EDT 2002
On Wed, 25 Sep 2002 00:21:59 -0300
"Karl Brandt "<pascalive at bol.com.br> wrote:
>AFAIK it wasn't applied(i updated cvs today)
wierd.. I update daily, and I tried to apply your patch before I wrote that
and it told me, already applied do you want to remove... et al. So I assumed
it was applied... hrmm.... And all my tests showed proper functionalitly
which it didn't before your Patch... I dunno whats up..
>What i tried to do was the above (it's not complete!), although i disagree
>It looks like the WinControl.ClientHeight/Width act as
>WinControl.Height/Width, so setting one or other will do the same thing.
>Please correct me if i'm wrong
This is why I said IF it is implemented properly. I wasn't sure.
>I think the best behavior is to implement ClientHeight/Width and
>Height/Width as Delphi does:
>If you set the client sizes automatically the correct window sizes are set
>in this manner the lcl user could decide if he wants set the client or the
>window size and makes ClientHeight/Width really useful.
Yes this is probably how it should be done for Win32
>One way to implement-it:
>Setting the ClientHeight would calculate the apropriate (Window)Height via
>AdjustWindowRectEx (Now it's only a hack-> it would be done by the
>Then the Height would be adjusted and the interface called to set the
>The contrary would be true: Height -> ClientHeight
makes a sort of sense...
>>This is an incompatibility between X-Windows and Win32 design, not a
>>problem in the Lazarus code.
>Is there a way to set the window size instead of client size in gtk?
>Is there a equivalent Windows.AdjustWindow(Client)RectEx in gtk?
This IS the incompatibility.. in XWindows the Border Width Height etc is
determined by the window manager, which is a separate program, without any
consistant standards or interface library to get this info from. Thus it is
Impossible to set the Width/Height in the Win32 manner in an XWindows
environment, unless you want to try and add support for every known WM and
keep adding more and more support.. AFAIK this is the only way we could make
it work... As for the ClientRect, this is what setting Width/Height sets
under GTK(except I think under Win32.. but I am not sure)
Send and receive Hotmail on your mobile device: http://mobile.msn.com
More information about the Lazarus