Felipe Monteiro de Carvalho schrieb:

IMO we should accept that a Delphi compatible TTabControl doesn't exist yet,
for widgetsets other than Win32. What can/should we do, when it turns out
that such a control can not be implemented in all widgetsets?

I bet that it can be implemented in all widgetsets. I don't use
TTabControl, so I could be wrong, but I think that you could implement
it like this in Gtk2:

gtk_widget
->gtk_notebook
->gtk_widget

3 widgets put together. This should work fine if you can make
gtk_notebook show only the tabs without a client area.

Fine, when will the implementation be finished?


Why not offer the new implementation (TTabs/TNewTabControl) as TTabControl,
to make Delphi migrants happy, and restrict its use to only the supported
widgetsets? At the same time the old implementation can be renamed into
TLazTabControl, that is not fully Delphi compatible, but immediately usable
with all widgetsets?

We cannot have a control in the LCL which works in only 1 platform, if
it is really like that, then the current implementation is better.

After all the compatibility discussions I have the strong impression, that Delphi compatibility should be reconsidered. It's easy to provide fully compatible components for the Win32 platform, so why do we offer a very different implementation of the TTabControl, that can not be Delphi compatible by design???


More things can be simplified, in detail the difference between visible and
invisible pages, which applies *only* to the TPageControl.
part out of the widgetsets into TPageControl, the implementation of the
widgetsets and all TCustomTabControl descendants could be simplified a lot.
Then also the restrictions would become more obvious, introduced by the
various widgetsets.

Why *only* in bold. TCustomTabControl has only 2 descendents, so
TPageControl is 50% of it's descendents.

But 50% of the widgetset code is related only to TPageControl, and makes a TTabControl implementation overly complicated. E.g. a TCustomPage has to be used to transfer attributes to the widgetset, and TCustomPage is related only to TPageControl. When all the tab attributes are moved into an record, then it's no more required that all tabbed controls must create dummy page controls for every tab. And as mentioned above, invisible pages must not be handled in the widgetsets, this can be done exclusively in the TPageControl. When we finally implement a widget with a single client area, that area can be filled with nothing, pages or whatsoever, under full control of the controls. Then we can have a paged notebook again, by simply connecting the tab selection event to an untabbed notebook. Currently the situation is reversed, every tabbed control has to use a TPageControl internally, for the only purpose to show the tabs :-(

DoDi


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

Reply via email to