agw aui: how to properly hide and show panes?

92 views
Skip to first unread message

dhyams

unread,
Feb 2, 2013, 12:43:21 AM2/2/13
to wxpytho...@googlegroups.com
I have a "Window" menu as is standard on a lot of applications, that is in charge of hiding and showing AUI panes, as the user desires.  What I wrote up for the hiding and showing, I thought was OK.  But when I started letting panes be "NotebookDockable", things went awry; the showing and hiding code is apparently not appropriate.

I gathered that the AUI frame manager is creating an automatic AuiNotebook, but I don't see how I'm supposed to properly detach the pane from the notebook before hiding it. 

In the attached sample code, you can drag pane 3 to pane 1 to notebook dock with it, close pane 1 with the notebook's 'x' button, and then go to the Window menu and toggle the visibility of pane1.  Instead of pane1 coming back into the notebook or anywhere else, it draws at 0,0 in the parent window with no caption and is immovable.  

Sample code attached and pictures attached.

wxPython 2.9.1.1, Windows and Linux have identical behavior.  Didn't have time to test OSX.

Any pointers would be great!  Thanks,


aui.py
step1_run_the_script.png
step2_notebook_dock_pane3_to_pane1.png
step3_click_x_to_close_pane1.png
step4_from_menu_toggle_visibility_of_pane1.png

dhyams

unread,
Feb 5, 2013, 10:30:50 AM2/5/13
to wxpytho...@googlegroups.com
Friendly bump ;)

Andrea Gavana

unread,
Feb 5, 2013, 11:12:35 AM2/5/13
to wxpytho...@googlegroups.com
Hi,
I see the same issue as you. Unfortunately it looks like you have
bumped in one of the limitations of the AuiManager automatic-notebooks
woodoo, and for the moment I don't see how to solve the problem. One
(ugly) workaround might be to save the AuiManager perspectivewhen the
user closes a pane, and restore the perspective back when the notebook
page needs to be shown.


Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://www.infinity77.net

# ------------------------------------------------------------- #
def ask_mailing_list_support(email):

if mention_platform_and_version() and include_sample_app():
send_message(email)
else:
install_malware()
erase_hard_drives()
# ------------------------------------------------------------- #

dhyams

unread,
Feb 6, 2013, 12:18:55 AM2/6/13
to wxpytho...@googlegroups.com
Thank you Andrea, for the reply and the great toolkit!

I'll dig around and see if I can solve this one if I can.  In the meantime, if you have any epiphanies later on how this might be correctly handled, please post it up here ;)

Dennis Muhlestein

unread,
Jul 3, 2013, 3:01:42 PM7/3/13
to wxpytho...@googlegroups.com
Hm I was about to attempt the same thing and saw the same issue.  I thought about maybe detaching the pane and re-adding it when you want to show it but I get "odd notebook docking" exceptions so something didn't quite work with that.  Would be interested in a fix as well.  On Fedora 18 w/ 2.8.12.

tjohnson

unread,
Jul 24, 2015, 7:48:42 PM7/24/15
to wxPython-users, dhy...@gmail.com
I've come across the exact same problem, and haven't been able to find a solution. Has anyone figured out a good workaround yet?
Reply all
Reply to author
Forward
0 new messages