I am running a program developed for Win32 on Linux and I notice that setting the TabVisible to false on a PageControl make the whole tabsheet invisible.
Is that a known bug with the GTK2 page control?

Mailing lists / lazarus / 2012-04
5 messages · 4 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
I am running a program developed for Win32 on Linux and I notice that setting the TabVisible to false on a PageControl make the whole tabsheet invisible.
Is that a known bug with the GTK2 page control?
TabSheets have two properties (for Delphi compatibility), Visible and TabVisible. Visible controls the visibility of items within the client area of a TabSheet. TabVisible allows the display (or not) of the tabSheet as a whole.
My experience of the TabVisible property in Delphi and Lazarus Win32 is that TabVisible makes the tab label where you click visible, ie the contents of the tab can be visible (using the Visible property) but the caption for the tab can be hidden and that is what the TabVisible property is there for. My experience also indicates the same.
snippet from Delphi 7 help
===================
Description
Use TabVisible to temporarily remove a tab sheet from a page control. When TabVisible is false, the tab does not appear in the page control and its TabIndex property is -1. *Setting TabVisible to true allows the user to see the tab of the tab sheet again.*
I am running a program developed for Win32 on Linux and I notice that setting the…
I'm not sure, but according to my understanding of the GTK2 implementation such things can happen, at least when you hide the *last* visible tab. If I'm right, this really is worth a bug report.
DoDi
My experience of the TabVisible property in Delphi and Lazarus Win32 is that TabVisible…
Is that a known bug with the GTK2 page control? >> >
I noticed a while ago: (may be outdated...)
If all tabs are initially invisible the gtk-pagecontrol behaves unpredictable. However: if you have one initial tab thats visible it worked as expected without any problems.
I have still a hack implemented, i dont know if its still needed: Adding / deleting and toggling visibility during formCreate was problematic, so I placed a timer with interval 5, and modified the pagecontrol during the first timer event.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120425/807e8bfc/attachment.html>