Felipe Monteiro de Carvalho schrieb:

General concepts:
1> Avoid changing the current TPageControl as much as possible,
because it is extensively used and changes here might cause a pletora
of problems
2> I think it is no problem to introduce heavy changes to TTabControl
because it is rarely used
3> Use exactly the same class hierarchy as Delphi:

TCustomNotebook (in Delphi called TCustomTabControl)
--> TPageControl
--> TTabControl

That also was my design :-)

However I would do one thing differently from your idea: Let
TCustomTabControl still have a notion of pages so that it can fully
implement TPageControl, but allow it to be able to display tabs
without pages too. Hide page properties and let TPageControl increase
their visibility.

TCustomTabControl inherits (abstract) Pages from TCustomNotebook.

Just because this hard distinction of a control with pages and one
without makes sense in Windows it doesn't mean at all that it makes
sense in all widgetsets. Plus, just 1 implementation is better then 2
spread across various classes for the widgetset interfaces.

ACK, but the use of TCustomPage for Pages sucks.

As already mentioned, the EasyDockManager allows to dock any controls into its notebook, and there it's overkill to wrap every docked control into another page control. Instead the unused Tabs.Objects[] can hold any kind of controls, which can be used like pages, on demand.

And I would make smaller patches implementing the following actions:

1> Make sure TCustomNotebook can implement TTabControl, add an option
that it can work without tabs and test in all widgetsets (maybe it can
already do that, you would need to check this)

I only can test with the available widgetsets (Win32, eventually gtk2)

2> Change TTabControl to inherit from TCustomNotebook
3> Fix all problems found in the new TTabControl

I'd leave the following steps for later, and for people which can test their changes to the widgetsets.

DoDi


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to