[lazarus] ClientRect bugfixes
Mattias Gaertner
nc-gaertnma at netcologne.de
Mon May 20 12:33:18 EDT 2002
Hi all,
I have committed various fixes for client rectangles with the gtk-interface. See below for details.
This means that the 'Align' property can now be used.
The client rectangles are not 100% Delphi compatible for the simple reason, that the gtk resizes in a totally different way than the win32. There are two differences:
1. TGroupBox client area does not include the frame as in Delphi. This is an incompatibility, but IMO it makes more sense.
2. Client rectangles under gtk can resize without resizing the Bounds of the control. Both fires an OnResize event. This implicates, that it is not sufficient to just put all resizing code into the Form1Resize event. For example. If there is a control in a TGroupBox, which size/position depends on the ClientRect of the TGroupBox, then the OnResize event of the groupbox must be set.
- implemented TWinControl.GetClientRect
- fixed gtk-interface: clientrect is now determined correctly and updated, when
gtk updates in the correct way. This fixes for example the clientrect of
TCustomControl, TSynEdit, TTreeView, TOIPropertyGrid, TGroupBox, TRadioGroup.
- fixed TCustomForm.GetClientRect. The forms clientrect will now be right with
mainmenu, with statusbar and with mainmenu+statusbar.
- fixed scrollbar ranges of TSynEdit, TTreeView, TOIPropertyGrid
- reduced re-aligning of complex forms
- fixed ReCreateWnd: destroys now cleanly
- fixed TRadioButton set group on CreateWnd and DestroyWnd
- added InterfaceObject.GetWindowSize
Mattias
More information about the Lazarus
mailing list