Hi Frank,
2009/10/9 Frank Niessink:
Hi,
I switched to the latest version of agw.aui from Subversion , but I
can't get a caption on my CenterPane. This is how I'm adding panes:
def AddPage(self, page, caption, name):
paneInfo =
aui.AuiPaneInfo().Name(name).Caption(caption).Left().MaximizeButton().DestroyOnClose().FloatingSize((300,200))
# To ensure we have a center pane we make the first pane the
center pane:
if not self.manager.GetAllPanes():
paneInfo = paneInfo.CenterPane().CloseButton(False)
self.manager.AddPane(page, paneInfo)
self.manager.Update()
All panes have captions except the CenterPane...
This issue (together with the other in the previous message regarding
CenterPane) is due to the fact that the call to CenterPane() restore
the pane state to zero, actually clearing all your previous calls to
Caption(), DestroyOnClose() and so on.
I am not sure which is the best way to go: I could simply remove the
line which resets the pane state in CenterPane(), but this will then
probably break other applications that dynamically change the
CenterPane. This problem has never appeared before because normally
one knows a priori which is the center pane: for example, what I
usually do is:
pane = aui.AuiPaneInfo().Name(name).CenterPane()
self.manager.AddPane(window, paneInfo)
for window in allOtherWindows:
pane = aui.AuiPaneInfo().Name(name).Left().Caption(caption) # Or
Right(), or Top() etc...
self.manager.AddPane(window, paneInfo)
Is there any suggestion on how we should handle the resetting of the
pane state? Michael, Werner, Frank?
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/