[Lazarus] Adding and hiding TPageControl tabs
Mark Morgan Lloyd
markMLl.lazarus at telemetry.co.uk
Thu Sep 26 17:19:19 CEST 2013
>> I've got a TPageControl with a single design-time page, on which there's
>> a Synedit which is used (a) as a splash when there's no other tabs and
>> (b) as a template for design-time properties.
>>
>> I can add an extra tab and put a Synedit in it under program control,
>> and load it with text. What I can't do is hide the original (index zero)
>> tab: if I do, the Synedit vanishes:
>> PageControl in 1.0 has many bugs.
>>
> Please try 1.0.13 not released, you can get from svn fixes branch
> using svn.
> Or 1.3 (also not released)
> Or 1.1.99 from sourceforge
>
> 1.0.13 should be stable.
>
> The other 2 are work in progress
Thanks, I'll investigate upgrades.
> Also those fixes are Gtk2, Win and QT. No idea about the other
> widgetsets.
>
> And:
> I do not know if all widgetsets suppord displaying a page, when the
> tab is hidden. (You can hide all tabs, via ShowTabs)
I'm not trying to hide the tab but still see the page, I'm trying to
hide the entire page+tab+content (index zero) and only leave the
newly-created one (again, page+tab+content). But the last time I did any
of this was around about the time that the old TNotebook etc. was
deprecated, and I'm assuming that the rather convoluted sequence I was
using in those days is no longer appropriate.
> This may indeed hide the page :
> fTntPageControl.Pages[0].TabVisible := false; // Trouble
It hides everything at [0], but also hides the content of [1].
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the Lazarus
mailing list