[Lazarus] PageControl vs NoteBook vs TabControl

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Mar 8 07:40:19 CET 2010


Andreas Schneider het geskryf:
> 
> Here's a problem: TNotebook is _not_ a tab-type component (well, actually it 
> shouldn't be a tab-type component). The Delphi implementation is more or 
> less just a page manager so you can have several layers on one form that you 
> can switch between.

To me, that is exactly what a tab-type component is.


> That's why it would also be important to have no borders 

Well how hard can it no be to add a new "with borders" or "without borders"
property to the TNotebook. This minor detail still doesn't justify a
complete separate component.

> on it. IMHO it's a very useful component (if implemented like in Delphi) - 
> at least for smaller self-contained dialogs where frames would be "too 
> much".

Yes, another option that says: Show/Hide tabs. Again, no reason to have two
components that do exactly the same.


> A TabControl in contrast to a PageControl has _no_ pages. It really only 
> consists of tabs, so it isn't a container in any way.

Fine, I can see the difference with a TabControl, but the difference
between a PageControl and a Notebook control is stupid. The later two could
be rolled into one single component.

> So a PageControl is essentially a TabControl+Notebook.

OS/2 has Notebook control that displayed tabs. So does many X11 widgetsets.
I believe so does the Delphi Notebook control. It's just a different name
for the exact same thing.

Rolled into one, they would reduce maintenance, increase stability (because
everybody use the same component).

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/





More information about the Lazarus mailing list