Behavior of LCL Client Area (was: win32 development)
Karl Brandt
pascalive at bol.com.br
Tue Sep 24 23:13:35 EDT 2002
Andrew Johnson wrote:
>
> On Tue, 24 Sep 2002 17:41:13 +0200
> "Vincent Snijders" <vslist at zonnet.nl> wrote:
>
>> Last week Karl Brandt sent some patches for the win32 interface,
>> which fixed
>> the form size in win32. Have the been applied, because the helloform
>> is still to small?
>
>
> Yes the patch was applied.
AFAIK it wasn't applied(i updated cvs today)
> As was also mentioned.. somwhere in that thread, the reason it apears
> to small is because in GTK the Width/Height represent the
> ClientWidth/ClientHeight of the form, so in Win32 it looks wrong. If
> ClientWidth/Height have been implemented properly in Win32, then in
> the example code changing where it set the width and height to set the
> client width/height should make it apear properly.
What i tried to do was the above (it's not complete!), although i
disagree this way.
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
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 and vice-versa,
in this manner the lcl user could decide if he wants set the client or
the window size and makes ClientHeight/Width really useful.
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
interface).
Then the Height would be adjusted and the interface called to set the
desired size.
The contrary would be true: Height -> ClientHeight
> 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?
More information about the Lazarus
mailing list