[Lazarus] New TTabControl

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Mon Jul 25 08:10:12 CEST 2011


On Mon, Jul 25, 2011 at 12:35 AM, Hans-Peter Diettrich
<DrDiettrich1 at aol.com> wrote:
>> Your implementation did not work,
>
> Which widgetset?

I think that all of them, or at least gtk2 and carbon. These steps
failed for me:

1> Drop a TTabControl in the form
2> Right-click it and select AddTab

Result: Access Violation

> The current implementation reverted TTabControl into a paged control. This
> step is useless, because it now is a crippled TPageControl with no designer,
> and incompatible with the Delphi implementation :-(

My main objective here was fixing the class hierarchy, and that got fixed.

And for me it works in the designer.

As for further improving it, one key element here is that the Delphi
TTabControl is able to receive child elements, so it's not really that
TTabControl has no sheets, but rather that it always has 1 sheet and
child controls can be placed on it and clicking in the tabs doesn't
change which sheet is visible. So that's what Unpaged should implement
in the widgetsets.

And we should also add a AutoSize property, so that people can use the
TTabControl as a list of tabs without a client area. The AutoSize
would reduce it's Height to the necessary to show the tabs.

-- 
Felipe Monteiro de Carvalho




More information about the Lazarus mailing list