Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-07

LCL: TNotebook pages autosize

7 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner
to Micha Nelissen: TNotebook pages are implemented as windows with controls on them. Are there provisions…
Show quoted text 6 lines
Hi, TNotebook pages are implemented as windows with controls on them. Are there provisions for resizing this window when the TNotebook has resized? Does the interface do this in the GTK, or is win32 missing something?

No, Yes, Yes.

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.

Mattias

Reply by email

Micha Nelissen

Hi,

TNotebook pages are implemented as windows with controls on them. Are there provisions for resizing this window when the TNotebook has resized? Does the interface do this in the GTK, or is win32 missing something? Currently in the win32 implementation, notebook pages stay the same size.

Thanks,

Micha.

Reply by email

Mattias Gaertner
to Micha Nelissen
Show quoted text 27 lines
Micha Nelissen wrote: > Mattias Gaertner wrote: > >> On Mon, 07 Jul 2003 16:42:57 +0200 >> Micha Nelissen 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; When changing the LCL to let TPage also use Align := alClient instead of SetInitialBounds...I see that height/width is exactly the wrong way around. Page.Width seems to be Notebook.ClientHeight and Page.Height seems to be Notebook.ClientWidth. Can I be certain this is a problem in the win32 interface?

Yes, no problem under gtk.

Mattias

Reply by email

Micha Nelissen
to Micha Nelissen: TNotebook pages are implemented as windows with controls on them. Are there provisions…
Mattias Gaertner wrote 9 lines
On Mon, 07 Jul 2003 16:42:57 +0200 Micha Nelissen 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. 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.

Regards,

Micha.

Reply by email

Micha Nelissen
to Micha Nelissen: TNotebook pages are implemented as windows with controls on them. Are there provisions…
Mattias Gaertner wrote 29 lines
On Wed, 23 Jul 2003 22:07:01 +0200 Micha Nelissen wrote: >Mattias Gaertner wrote: > > >>On Mon, 07 Jul 2003 16:42:57 +0200 >>Micha Nelissen 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.

Can you explain the differences?

Now to "Align := alClient;": This was not yet possible, because the TPage is a special widget under gtk.

...

I see.

Show quoted text 6 lines
>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..

Hmm. I was describing win32-delphi-vcl behaviour (which we are trying to imitate AFAIK), what do you have in mind. Or do you rather want it in a new topic?

Micha.

Reply by email

Mattias Gaertner
to Micha Nelissen: TNotebook pages are implemented as windows with controls on them. Are there provisions…
Show quoted text 17 lines
Mattias Gaertner wrote: > On Mon, 07 Jul 2003 16:42:57 +0200 > Micha Nelissen 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

Reply by email

Micha Nelissen
to Micha Nelissen: TNotebook pages are implemented as windows with controls on them. Are there provisions…
Micha Nelissen wrote 19 lines
Mattias Gaertner wrote: > On Mon, 07 Jul 2003 16:42:57 +0200 > Micha Nelissen 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;

When changing the LCL to let TPage also use Align := alClient instead of SetInitialBounds...I see that height/width is exactly the wrong way around. Page.Width seems to be Notebook.ClientHeight and Page.Height seems to be Notebook.ClientWidth. Can I be certain this is a problem in the win32 interface?

Micha.

Reply by email