My tests are based on SampleEtoCollapsibleDialog.py in
I was writing my own form when I saw that collapsible sample and realized that it is not working.
It crashes cause the size of an invisible layout seems to be unknown until it is visible.
Then, when the button event tries to add hidden layout size to visible size, values are wrong.
self.ClientSize = drawing.Size(max(self.ClientSize.Width, self.collapsePanel.Width), self.ClientSize.Height + self.collapsePanel.Height)
The first time the button event is triggered self.collapsePanel.Height equates 0.
I tried to collapse it at start and it isn’t really neat visually and programmatically.
So, if I want to start a dialog with a hidden part …
Is there a way to pre-calculate size of layout without showing it ?
regardsSampleEtoCollapsibleDialog.py (5.6 KB)