A question about how to create pane and dock to notebook with implementation of lib.agw.aui

0 views
Skip to first unread message

ken lu

unread,
Jul 10, 2009, 11:50:40 PM7/10/09
to wxPyth...@googlegroups.com, Andrea Gavana
Hi, Andrea and members:
I am using/studying the python aui in lib.agw.aui.
Now I write an application, when it is launched at first time, application will create bundle of floating window, I wish dock these windows into left/right notebook in programming. But I am failed.
 
The above my requirement like perspective, but because it is first time loaded, so no perstive has been saved.
Just like virtual studio, when visual studio is started, the workspace, resource views are automatically shown in left/right size notebook.
Seems in current aui implementation, the float window can be only docked left/right in seperated pane, no way to create notebook automatically.
 
Could anyone gives me more guideline for this feature?
 
 
 
--
Ken

ken lu

unread,
Jul 14, 2009, 2:59:38 AM7/14/09
to wxPyth...@googlegroups.com
Ping?
Now I have found a workaround methods that construct the perspecitve string and invoken AuiManager.LoadPerspective() to force layout and create note book. 
For example:
==========
    side1pane = auiex.AuiPaneInfo().Name("side1").NotebookPage(0)
    per += "%s|" % mgr.SavePaneInfo(side1pane)
    side2pane = auiex.AuiPaneInfo().Name("side2").NotebookPage(0)
    per += "%s|" % mgr.SavePaneInfo(side2pane)
    notebookpane = auiex.AuiPaneInfo().Name("123").NotebookControl(0).Left().BestSize(96, 95).Dockable().NotebookDockable(False)
    notebookpane.dock_proportion = 100000             <===workaround
    per += "%s|" % mgr.SavePaneInfo(notebookpane)
    mgr.LoadPerspective(per)

    So side1 and side2 control will be put into a notebook automatically.
    
    However I made a workaround in above code, I quite do not understand the dock_proportion.

   Thanks your for any comments or suggestion.

Ken
--
Ken
Reply all
Reply to author
Forward
0 new messages