Hidden panel on pagecontrol on panel is always visible
Original Reporter info from Mantis: hadyatmo
-
Reporter name: Hadyatmo Ang
Original Reporter info from Mantis: hadyatmo
- Reporter name: Hadyatmo Ang
Description:
I found this problem with my project after upgrading lazarus from 0.9.30.4 to 1.0.6. My project have a form with a hidden panel on top of a disabled pagecontrol and the pagecontrol is on top of a panel. The hidden panel is always visible to user even I set the visible property to false on design or by setting it on the run. The only way to hide it is by setting the property on the run to true then back again to false. My explanation maybe a bit confusing so I also upload a simple project showing the problem.
Steps to reproduce:
- Put a Panel on empty form
- Put a PageControl on top of the Panel, add two TabSheet, then set the PageControl property Enabled = false
- Put a Panel on then second TabSheet, then set the Panel property Visible = false
- Put a Button outside of the PageControl (can be put on the form or on the first panel) then fill the OnClick event with statement to enable the PageControl
- Set the ActivePage property in PageControl to the first TabSheet (the one without the hidden panel)
- Compile and run the project
- On the running project, enable the PageControl by clicking the button. Then switch the PageControl to the second TabSheet, there you can see the hidden panel is not hidden
Additional information:
*) Changing the ActivePage property to the TabSheet with hidden panel will only hide the panel before switching to another TabSheet. After switching to another TabSheet and back, the hidden panel is not hidden anymore.
*) The problem existed since lazarus 1.0.0 up to 1.0.6, it is not existed in old 0.9.30.4, so I'm staying with 0.9.30.4 until this problem solved