I’d like to ask, whether the CenterPane can be omitted in wx.aui.AuiManager; - basically I’d like to divide the application window into several columns - vertical docks (usually 3-5), each divided horizontally. Ideally, there should be no space left besides these columns; curently there remains a column as CentrePane (or as an equivalent empty space, if CentrePane isn’t defined).
I somehow could achieve a similar effect using AuiNotebook or AUI_MDI - this looks much better: after resizing the column width the other columns are directly adjusted, rather than creating an empty space, which has to be corrected in the next step.
However, this only works after manually dragging each pane to an individual dock as all panes should be visible (hence, this is probably an usual use case for these widgets). Besides this, I couldn’ find a programmatic way to do this layout e.g. in AuiNotebook (the panes are normally added next to each other in one dock).
Alternatively I tried to use a CentrePane made as small as possible, but I haven’t been able to set the column (dock) width directly, as e.g. BestSize(…) seem to apply directly only for floating panes (the docked ones seem to be calculated somehow specifically).
Maybe I could try some fiddling with the SavePerspective strings, but I’d hope this isn’t the expected approach.
As I underestand it, the AuiManager is the base for the other aui widgets, could it be made working in a similar way with regard to CentrePane? (ie. not showing it until at least one pane is present)
I'd like to ask, whether the CenterPane can be omitted in wx.aui.AuiManager; - basically I'd like to divide the application window into several columns - vertical docks (usually 3-5), each divided horizontally. Ideally, there should be no space left besides these columns; curently there remains a column as CentrePane (or as an equivalent empty space, if CentrePane isn't defined).
I somehow could achieve a similar effect using AuiNotebook or AUI_MDI - this looks much better: after resizing the column width the other columns are directly adjusted, rather than creating an empty space, which has to be corrected in the next step.
However, this only works after manually dragging each pane to an individual dock as all panes should be visible (hence, this is probably an usual use case for these widgets). Besides this, I couldn' find a programmatic way to do this layout e.g. in AuiNotebook (the panes are normally added next to each other in one dock).
Alternatively I tried to use a CentrePane made as small as possible, but I haven't been able to set the column (dock) width directly, as e.g. BestSize(...) seem to apply directly only for floating panes (the docked ones seem to be calculated somehow specifically).
Maybe I could try some fiddling with the SavePerspective strings, but I'd hope this isn't the expected approach.
As I underestand it, the AuiManager is the base for the other aui widgets, could it be made working in a similar way with regard to CentrePane? (ie. not showing it until at least one pane is present)
I'm not sure, I don't really know the ins and outs of AUI. Maybe a better question to ask is what do you want to be there if you drag all of the (other) panes out of the managed frame? Make that be your center pane.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Thank you for the answer Robin,
actually, in my current app, I use a kind of neutral background-pane
as CenterPane, but I'd like it not to be visible much, until there are
other - "working" ones (as opposed to this formal spacer).
I must say, I was amazed, when I found aui, as there is powerful
docking functionality available out of the box; however, some details
of my application seem to get complicated.
My layout consist of multiple text panels, their control panels and
one image panel. All of these should be movable, can be closed/hidden
and reactivated.
Besides these, there is one non-closable, but movable pane, from which
the menu is called (this one should actually be fixed-width, hence not
suitable as centre pane)
The usual layout looks roughly like this (I hope, it remains somehow
readable): (CenterPane is the thin column - second from the left).
···
2008/12/2 Robin Dunn <robin@alldunn.com>
Vlastimil Brom wrote:
Hi all,
I'd like to ask, whether the CenterPane can be omitted in wx.aui.AuiManager; -...
I'm not sure, I don't really know the ins and outs of AUI. Maybe a better question to ask is what do you want to be there if you drag all of the (other) panes out of the managed frame? Make that be your center pane.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
However, I don't seem to be able to set this layout programmatically
with usual calls to aui manager. The width of the docks probably
cannot be set - after the program start the empty CenterPane is the
thickest column (the only way I found was a kind of hackish manual
manipulation of the perspective and reloading it).
I hope, the problem is more clear now, basically, there is no explicit
hierarchy of the panes; Ideally I'd like to have a kind of MDI
behaviour, where alle active panes are simultaneously visible. After
closing some pane the neighbour ones would fill the space (until at
least one were available), dragging the panes border would resize it
at the cost of the neighbour ones or fail, if it weren't possible.
(actually, now it appears to me sometimes like a magic to determine,
what happens after moving or resizing a pane in a more complex aui
layout - like the wxpython aui demo with all panes).
My current partly "solution" with the almost invisible thin CentrePane
seems rather unnatural when resizing the "columns" - in two steps -
first one has to enlarge this CentrePane in order to be able to use
this space for the other column, to get it wider.
Any suggestions how to manage this in a better way would be much appreciated;
(if something needs a further clarification or if I should post some
portions of the used code, please let me know);