[lazarus] LCL: TNotebook pages autosize

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Jul 24 03:35:31 EDT 2003


On Wed, 23 Jul 2003 22:07:01 +0200
Micha Nelissen <M.Nelissen at student.tue.nl> wrote:

> Mattias Gaertner wrote:
> 
> > On Mon, 07 Jul 2003 16:42:57 +0200
> > Micha Nelissen <M.Nelissen at student.tue.nl> wrote:
> > 
>   >>Currently in the win32 implementation, notebook pages stay
> >>the same size.
> > 
> > 
> > It must be done, by the interface, because the VCL/LCL has no mechanism
> > to let all childs fill up the client area and overlapp each other.
> 
> If I look at the delphi VCL then it contains the line
> 
> Align := alClient;
> 
> in TTabSheet.Create constructor. 

First of all: TTabSheet <> TPage.
TTabSheet and TPageControl needs to be implemented. It is very similar to
TNoteBook and TPage, so we should try to share as much code as possible.

Now to "Align := alClient;":
This was not yet possible, because the TPage is a special widget under gtk.
This widget can not be resized by the LCL. If you set Align:=alClient, the
LCl will try to resize it, and the gtk will resize it back - a circle.
Because this could happen with other widgets too, this was a general
problem. "Was", because it is no more. The LCL now recognizes simple
circles. 
And so I added the "Align:=alClient" to TPage.


> So resizing is done by the pagecontrol 
> itself as if it were a tpanel or tform or whatever. 


> As a side note: if i 
> create two groupboxes on a form, both with align:=alClient, then they 
> are both as big as the client area of the form, thus overlapping.

This should be discussed separately..


Mattias






More information about the Lazarus mailing list