Michael Van Canneyt wrote:
>
> On Fri, 3 Nov 2006, Tiziano_mk wrote:
>
>> I'm trying to understand why in Lazarus (opposite to Delphi) the
>> width/clientwidth and height/clientheight form properties have always the
>> same
>> value and do not consider the borders of the form.
>>
>> in C:\Programmi\FPC\lazarus\lcl\interfaces\win32\win32wsforms.pp
>>
>> under class procedure TWin32WSCustomForm.SetBounds
>>
>> I read this comment:
>>
>> // the LCL defines the size of a form without border, win32 with.
>> // -> adjust size according to BorderStyle
>>
>> so I suppose, if this is not to be considered a bug, on Lazarus I need to
>> keep
>> this in consideration when I place my forms on the desktop.
>
> Yes.
> The problem is, I suppose, that the width of the borders is not known to X on
> unix.
> The window manager is a separate process which draws the borders, and I don't
> think it communicates the width of the borders it uses.
>
> To be cross-platform, the border is therefore also not taken into account on
> Windows.
>
Although it's getting better. With the Extended window manager hints
spec. It is possible to get the size of the window including the frame.
But the frame size could vary quite a bit just with changing the theme.
So unless autosizing of the controls is done, suddenly the
ClientWidth/Height could be too small and the window has changed it's
bordersizes but the height/width of the frame is still the same.
I hope that made sense because it sounded confusing to me. :)
Andrew
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives