AuiManager and setting dock size

Is it possible to manually change the dock size?

My problem is that I have a customized tool bar:

I can add items to the toolbar (and by that - change its width) and can change the icon’s size (Large/Medium/Small, so the toolbar’s hight can change as well).

To fix the width changes I did this:

pane = self.parent._mgr.GetPane(self)
if pane.window is not None:
pane.window.SetInitialSize()
pane.BestSize(pane.window.GetEffectiveMinSize() + (0, 1))

        self.parent._mgr.Update()

Unfortunately, this code doesn’t help to fix the hight changes: if the toolbar was initially set to size X, then setting it to any smaller size will cause an empty space (that never repaints, like an hole). The initial size is set when (a) loading a perspective or (b) hiding the then reshowing the toolbar (with a little break between the two operations).

After making a few tests I realized that the dock size is the cause of the problem, it only checks for minimum size but maximum size has no effect. so everything works well when the dock size is set to 0 (I can see it in LayoutAll in the PyAUI code).

As a side note, I’m using wx.aui and not PyAUI (thanks Andrea) because I need the aui notebook.

My questions are:

  1. As already mentioned, is it possible to manually change the dock size?

  2. Can I manually call what ever it is that’s being called after Hiding&Reshowing?

Thanks,

Roee.

Just wanted to add what I currently do to bypass it:

pane = self.parent.frame._mgr.GetPane(self)
pane.window.SetInitialSize()
pane.BestSize(pane.window.GetEffectiveMinSize() + (0, 1))
pane.Show(False)
self.parent.frame._mgr.Update()
pane.Show()
self.parent.frame._mgr.Update()

By hiding the pane and calling Update I can change the dock size to 0.

Yet I hope there is a nicer way to do that.

Thanks,

Roee.

···

On 2/3/07, roee shlomo roee88@gmail.com wrote:

Is it possible to manually change the dock size?

My problem is that I have a customized tool bar:

I can add items to the toolbar (and by that - change its width) and can change the icon’s size (Large/Medium/Small, so the toolbar’s hight can change as well).

To fix the width changes I did this:

pane = self.parent._mgr.GetPane(self)
if pane.window is not None:
pane.window.SetInitialSize()
pane.BestSize(pane.window.GetEffectiveMinSize() + (0, 1))
self.parent._mgr.Update()

Unfortunately, this code doesn’t help to fix the hight changes: if the toolbar was initially set to size X, then setting it to any smaller size will cause an empty space (that never repaints, like an hole). The initial size is set when (a) loading a perspective or (b) hiding the then reshowing the toolbar (with a little break between the two operations).

After making a few tests I realized that the dock size is the cause of the problem, it only checks for minimum size but maximum size has no effect. so everything works well when the dock size is set to 0 (I can see it in LayoutAll in the PyAUI code).

As a side note, I’m using wx.aui and not PyAUI (thanks Andrea) because I need the aui notebook.

My questions are:

  1. As already mentioned, is it possible to manually change the dock size?
  1. Can I manually call what ever it is that’s being called after Hiding&Reshowing?

Thanks,

Roee.