I’m trying to create adjustable perspective, so I have to allow user to hide or restore panes, but I can’t get ShowPane function to do anything at all. I can close pane, but then I’m unable to restore it
I'm trying to create adjustable perspective, so I have to allow user to hide
or restore panes, but I can't get ShowPane function to do anything at all. I
can close pane, but then I'm unable to restore it
You are creating an automatic AuiNotebook when you use AddPane with
the `target` keyword; unless I am missing something, what is it that
you are trying to do? Switch pages on the notebook? Something else?
And I mean hide as really hide, not switching to other tab, not minimizing it, really hide so user can’t restore it without using my defined way - menu item.
There is currently no way to do it for automatic notebooks. You can do
it for normal floating/docked panes, but auto-notebooks are a bit more
complicated. There might be a way to do it by tracking the pane
status, like this (just an example, not tested):
a bit funny, I finded this solution about 30 min after posting this thread, now the problem is, that if in target = bottomPane, bottomPane doesn’t contain any window it get’s ignored and new pane, I guess, defaults to wx.LEFT, haven’t found workaround for this one yet. cu’s bottomPane.IsShown() and bottomPane.IsOk() returns True, even if this pane is empty and take’s no space on screen.
I guess I could catch this situation by checking each pane’s location and if no one is in bottomPane, then try to create new one and destroy old one, but this really not “The right way” to do things
It might be possible, that I’ve constructed this whole frame thing a bit wrong. Can I add empty pane, which is usable only as target and it isn’t main pane for any windows? Cus until now I can’t find how to do that, but if I could, this would resolve my problems, I think.
Thanks for replay’s Andrea.
···
On Tuesday, September 4, 2012 2:47:44 PM UTC+3, Infinity77 wrote:
On 4 September 2012 14:32, jj wrote:
I want to “hide”, “close” or whatever on tab, which might be only tab or
even floating window, and later I want to restore it.
In my logic auiManager.Show() should do exactly that… and when executed
with False as argument it should hide window, so it can’t be seen.
There is currently no way to do it for automatic notebooks. You can do
it for normal floating/docked panes, but auto-notebooks are a bit more
complicated. There might be a way to do it by tracking the pane
status, like this (just an example, not tested):
def onButClk(self, event):
auiManager = self.parent.auiManager
conPane = auiManager.GetPaneByName("con1")
if conPane and conPane.IsShown():
conPane.Float()
conPane.Hide()
auiManager.DetachPane(conPane)
else:
auiManager.AddPane(self.secondConsole, secondConcolePane,
target = bottomPane)
conPane.Show()
auiManager.Update()
But nothing built-in. Patches improving AGW are most welcome, as usual.
Andrea.
“Imagination Is The Only Weapon In The War Against Reality.”