Lazarus
Programming => Widgetset => Cocoa => Topic started by: MISV on June 21, 2018, 12:26:21 am
-
I have found 3 ways to reproduce a (big) bug with how TPageControl behaves in Cocoa when using TabVisible if the individual TTabSheet in the control. Essentially controls appear gone in pages/tabs following the one made invisible.
See the next post on the 3 different ways to reproduce the problem.
I am using Mac 10.13.5 with Lazarus "trunk" 1.9.0 (June 20h 2018)
Bug report here:
https://bugs.freepascal.org/view.php?id=33896 (https://bugs.freepascal.org/view.php?id=33896)
-
Reproduce method A
1) Create a form with a TPageControl with 5 pages (and thus also tabs). Have each page contain a unique control you can recognize.
2) Add a button at top of form - when clicking it, it should set the 3'rd page tabsheet TabVisible:=False
3) Now all controls appear gone from the last two tabs.
Reproduce method B
1) Create a form with a TPageControl with 5 pages (and thus also tabs). Have each page contain a unique control you can recognize.
2) In the form designer set the 3'rd page tabsheet TabVisible:=False
3) Now all controls appear gone from the last two tabs. (But only when running the program. The form designer does not exhibit the problem)
Reproduce method C
1) At runtime set all TTabSheet in a TPageControl to *TabVisible := False*. At runtime all content appear gone even if MyExamplePageControl.ActivePageIndex > -1