I can't figure out how to dynamical show/hide a pane.
I do:
self._mgr.AddPane(self.paneLog, aui.AuiPaneInfo().
Name("paneLog").Caption(_("vinoXML import error/warning log - read-only")).
Bottom().
Layer(2).
Position(0).
CaptionVisible(True).
CloseButton(False).
MaximizeButton(True).
MinimizeButton(True))
....
pl = self.view._mgr.GetPane("paneLog")
pl.Hide()
self.view.paneLog.Hide()
If I now check pl.IsShown() and self.view.paneLog.IsShown() they both return "False", now I do:
self.view._mgr.Update()
And the status changes to Shown and the panel is obviously shown.
What am I missing?
Werner
Hi Werner,
I can't figure out how to dynamical show/hide a pane.
I do:
self._mgr.AddPane(self.paneLog, aui.AuiPaneInfo().
Name("paneLog").Caption(_("vinoXML import
error/warning log - read-only")).
Bottom().
Layer(2).
Position(0).
CaptionVisible(True).
CloseButton(False).
MaximizeButton(True).
MinimizeButton(True))
....
pl = self\.view\.\_mgr\.GetPane\("paneLog"\)
pl\.Hide\(\)
self\.view\.paneLog\.Hide\(\)
If I now check pl.IsShown() and self.view.paneLog.IsShown() they both return
"False", now I do:
self.view._mgr.Update()
And the status changes to Shown and the panel is obviously shown.
What am I missing?
Uhm, nothing that I can see at the moment... does it happen even if you do:
pl = self.view._mgr.GetPane("paneLog")
pl.Hide()
self.view._mgr.Update()
Without the other call to "Hide()"?
Does it happen if you change it like this:
pl = self.view._mgr.GetPane(self.paneLog)
pl.Hide()
self.view._mgr.Update()
?
I use dynamically shown/hidden panes all the times, so I guess there
is something strange going on...
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
···
On 21 May 2012 15:45, Werner wrote:
Hi Andrea,
Thanks for the quick reply.
It has to do with:
wx.CallAfter(self.persistRegisterControls)
Just stepped through it in the debugger and noticed that the above causes the persist loading to be done after I did the hide/update stuff.
If I don't use CallAfter then the hide/show works fine.
I am sure I had a reason to put CallAfter in in the first place, but stupid me didn't comment why.
Will just have to keep an eye on this.
Thanks
Werner