Preventing the main frame from being dragged with Andrea's AUI

Hi,

I just switched to Andrea's AUI with wxPython 2.8.10.1 on Windows and
noticed that I can now drag the main frame out of the window, leaving
a "hole" that can never be filled by any of the managed frames. How
can I prevent the main frame from being dragged out of the window?

Cheers, Frank

Hi Frank,

2009/10/8 Frank Niessink:

Hi,

I just switched to Andrea's AUI with wxPython 2.8.10.1 on Windows and
noticed that I can now drag the main frame out of the window, leaving
a "hole" that can never be filled by any of the managed frames. How
can I prevent the main frame from being dragged out of the window?

You're not really talking about wx.Frames, are you? You mean AUI
panes, right? Well, the CenterPane() should not be draggable anywhere,
unless you explicitly specify Movable().CaptionVisible() and something
else. Is it something that can be reproduced with the AUI demo? Are
you using the SVN version of AUI?

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

You're not really talking about wx.Frames, are you? You mean AUI
panes, right?

Yes, sorry: panes, not frames.

Well, the CenterPane() should not be draggable anywhere,
unless you explicitly specify Movable().CaptionVisible() and something
else. Is it something that can be reproduced with the AUI demo? Are
you using the SVN version of AUI?

I'm using the version included in wxPython 2.8.10.1. Here's how the
panes are added:

    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.Center().CloseButton(False)
        self.manager.AddPane(page, paneInfo)
        self.manager.Update()

So the center pane does have a caption. I want the caption, but I
don't expect it to be floatable. At least that's how it worked with
the regular AUI. Anyway, this seems to get me back the behavior I
want, at least partially:

            paneInfo = paneInfo.Center().Floatable(False).CloseButton(False)

Now the center pane does have a caption, but is not floatable.
Unless.... I drag another pane onto the center pane, creating a tab
control (I think that's how that is called?) and then that whole tab
control can be floated, but not docked (at least not easily, I managed
to dock it only once in a few dozen tries). See the attached
screenshot, where "Tasks" is (was) the main pane.

Thanks, Frank

···

2009/10/8 Andrea Gavana <andrea.gavana@gmail.com>:

Do you have a way to reproduce this with the AUI demo? I can't make it
happen with the latest svn version (i tried a few combinations of the
attributes you have set on the pane)..

I believe I can fix this if I have a way to reproduce it...It's
probably in the way the automatic notebook is created, the
framemanager makes a new pane as the notebook base which probably
doesn't carry the floatable attribute over

(this might become a case of which pane's attributes does it use? but
i'm in agreement that in this instance it should respect it)...

Also I suggest getting the latest version from the svn repository
regardless, andrea has added some new features and fixed a few bugs
since then...

- Michael H

···

On Oct 8, 4:46 pm, Frank Niessink <fr...@niessink.com> wrote:

2009/10/8 Andrea Gavana <andrea.gav...@gmail.com>:

> You're not really talking about wx.Frames, are you? You mean AUI
> panes, right?

Yes, sorry: panes, not frames.

> Well, the CenterPane() should not be draggable anywhere,
> unless you explicitly specify Movable().CaptionVisible() and something
> else. Is it something that can be reproduced with the AUI demo? Are
> you using the SVN version of AUI?

I'm using the version included in wxPython 2.8.10.1. Here's how the
panes are added:

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.Center().CloseButton(False)
self.manager.AddPane(page, paneInfo)
self.manager.Update()

So the center pane does have a caption. I want the caption, but I
don't expect it to be floatable. At least that's how it worked with
the regular AUI. Anyway, this seems to get me back the behavior I
want, at least partially:

        paneInfo = paneInfo\.Center\(\)\.Floatable\(False\)\.CloseButton\(False\)

Now the center pane does have a caption, but is not floatable.
Unless.... I drag another pane onto the center pane, creating a tab
control (I think that's how that is called?) and then that whole tab
control can be floated, but not docked (at least not easily, I managed
to dock it only once in a few dozen tries). See the attached
screenshot, where "Tasks" is (was) the main pane.

Thanks, Frank

AUITC.PNG
77KViewDownload

Hi Frank,

2009/10/8 Frank Niessink:

You're not really talking about wx.Frames, are you? You mean AUI
panes, right?

Yes, sorry: panes, not frames.

Well, the CenterPane() should not be draggable anywhere,
unless you explicitly specify Movable().CaptionVisible() and something
else. Is it something that can be reproduced with the AUI demo? Are
you using the SVN version of AUI?

I'm using the version included in wxPython 2.8.10.1. Here's how the
panes are added:

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.Center().CloseButton(False)
self.manager.AddPane(page, paneInfo)
self.manager.Update()

So the center pane does have a caption. I want the caption, but I
don't expect it to be floatable. At least that's how it worked with
the regular AUI. Anyway, this seems to get me back the behavior I
want, at least partially:

       paneInfo = paneInfo\.Center\(\)\.Floatable\(False\)\.CloseButton\(False\)

Now the center pane does have a caption, but is not floatable.
Unless.... I drag another pane onto the center pane, creating a tab
control (I think that's how that is called?) and then that whole tab
control can be floated, but not docked (at least not easily, I managed
to dock it only once in a few dozen tries). See the attached
screenshot, where "Tasks" is (was) the main pane.

I see what you mean: however, you should really try and use the SVN
version of AUI. Michael and I have been working quite a lot on
improving AUI, and I am sure we can crash this bug (if it's still
present in the SVN version) if we have a way to reproduce it in the
demo (I also can't reproduce it at the moment).

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

2009/10/8 Andrea Gavana <andrea.gavana@gmail.com>:

Frank Niessink wrote:

2009/10/8 Andrea Gavana :
You're not really talking about wx.Frames, are you? You mean AUI
panes, right?
Yes, sorry: panes, not frames.
Well, the CenterPane() should not be draggable anywhere,
unless you explicitly specify Movable().CaptionVisible() and something
else. Is it something that can be reproduced with the AUI demo? Are
you using the SVN version of AUI?

    I'm using the version included in wxPython 2.8.10.1. Here's how the
panes are added:
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.Center().CloseButton(False)

Instead of .Center() I think this should be .CenterPane()

Werner

···

andrea.gavana@gmail.com

werner wrote:

Frank Niessink wrote:

2009/10/8 Andrea Gavana :
You're not really talking about wx.Frames, are you? You mean AUI
panes, right?
Yes, sorry: panes, not frames.
Well, the CenterPane() should not be draggable anywhere,
unless you explicitly specify Movable().CaptionVisible() and something
else. Is it something that can be reproduced with the AUI demo? Are
you using the SVN version of AUI?

    I'm using the version included in wxPython 2.8.10.1. Here's how the
panes are added:
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.Center().CloseButton(False)

Instead of .Center() I think this should be .CenterPane()
BTW, I don’t think one can add the CenterPane to a notebook (or “add”
other panes to the centerpane to form a notebook), at least for me this
only works for other panes.

Werner

···

andrea.gavana@gmail.com

Hi,

2009/10/9 werner:

werner wrote:

Frank Niessink wrote:

You're not really talking about wx.Frames, are you? You mean AUI
panes, right?

Yes, sorry: panes, not frames.

Well, the CenterPane() should not be draggable anywhere,
unless you explicitly specify Movable().CaptionVisible() and something
else. Is it something that can be reproduced with the AUI demo? Are
you using the SVN version of AUI?

I'm using the version included in wxPython 2.8.10.1. Here's how the
panes are added:

    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.Center().CloseButton(False)

Instead of .Center() I think this should be .CenterPane()

BTW, I don't think one can add the CenterPane to a notebook (or "add" other
panes to the centerpane to form a notebook), at least for me this only works
for other panes.

Correct. The CenterPane is untouchable in this sense, as long as you
provide the correct flags (CenterPane() instead of Center() as Werner
mentioned).

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

2009/10/8 Andrea Gavana <andrea.gavana@gmail.com>:

It was a very simple fix, I've sent andrea the patch and usually he
gets them applied pretty quickly. Whenever a notebook base is created
when you drop a floating pane, it will carry over the floatable
attribute from the pane you are dropping onto. It was created against
the latest svn checkout.

- Michael H

···

On Oct 9, 5:26 am, Andrea Gavana <andrea.gav...@gmail.com> wrote:

Hi,

2009/10/9 werner:

> werner wrote:

> Frank Niessink wrote:

> 2009/10/8 Andrea Gavana <andrea.gav...@gmail.com>:

> You're not really talking about wx.Frames, are you? You mean AUI
> panes, right?

> Yes, sorry: panes, not frames.

> Well, the CenterPane() should not be draggable anywhere,
> unless you explicitly specify Movable().CaptionVisible() and something
> else. Is it something that can be reproduced with the AUI demo? Are
> you using the SVN version of AUI?

> I'm using the version included in wxPython 2.8.10.1. Here's how the
> panes are added:

> 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.Center().CloseButton(False)

> Instead of .Center() I think this should be .CenterPane()

> BTW, I don't think one can add the CenterPane to a notebook (or "add" other
> panes to the centerpane to form a notebook), at least for me this only works
> for other panes.

Correct. The CenterPane is untouchable in this sense, as long as you
provide the correct flags (CenterPane() instead of Center() as Werner
mentioned).

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."http://xoomer.alice.it/infinity77/http://thedoomedcity.blogspot.com/

Also to redock the floating Center() pane just double click on the
caption (or did that not work as well?)

- michael

···

On Oct 9, 1:37 pm, michael h <michaelke...@gmail.com> wrote:

It was a very simple fix, I've sent andrea the patch and usually he
gets them applied pretty quickly. Whenever a notebook base is created
when you drop a floating pane, it will carry over the floatable
attribute from the pane you are dropping onto. It was created against
the latest svn checkout.

- Michael H

On Oct 9, 5:26 am, Andrea Gavana <andrea.gav...@gmail.com> wrote:

> Hi,

> 2009/10/9 werner:

> > werner wrote:

> > Frank Niessink wrote:

> > 2009/10/8 Andrea Gavana <andrea.gav...@gmail.com>:

> > You're not really talking about wx.Frames, are you? You mean AUI
> > panes, right?

> > Yes, sorry: panes, not frames.

> > Well, the CenterPane() should not be draggable anywhere,
> > unless you explicitly specify Movable().CaptionVisible() and something
> > else. Is it something that can be reproduced with the AUI demo? Are
> > you using the SVN version of AUI?

> > I'm using the version included in wxPython 2.8.10.1. Here's how the
> > panes are added:

> > 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.Center().CloseButton(False)

> > Instead of .Center() I think this should be .CenterPane()

> > BTW, I don't think one can add the CenterPane to a notebook (or "add" other
> > panes to the centerpane to form a notebook), at least for me this only works
> > for other panes.

> Correct. The CenterPane is untouchable in this sense, as long as you
> provide the correct flags (CenterPane() instead of Center() as Werner
> mentioned).

> Andrea.

> "Imagination Is The Only Weapon In The War Against Reality."http://xoomer.alice.it/infinity77/http://thedoomedcity.blogspot.com/

Yes, thanks. This now does what I want except for the floating tab
control and without yet using svn (will do that in a moment):

    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).MaximizeButton(True)
        self.manager.AddPane(page, paneInfo)
        self.manager.Update()

Note how I had to explicitly add MaximizeButton (again) to the
paneInfo. Apparently CenterPane() turns off the MaximizeButton?

Cheers, Frank

···

2009/10/9 werner <wbruhin@free.fr>:

Instead of .Center() I think this should be .CenterPane()

Yes, that works (without using the svn version yet), but it's not
apparent from the user interface that that is an option. And if I
don't guess it I can't expect my users to guess it, right? :slight_smile:

Thanks, Frank

PS: Will try the latest version from svn in a moment.

···

2009/10/9 michael h <michaelkenth@gmail.com>:

Also to redock the floating Center() pane just double click on the
caption (or did that not work as well?)

Hi Frank,

2009/10/9 Frank Niessink:

Also to redock the floating Center() pane just double click on the
caption (or did that not work as well?)

Yes, that works (without using the svn version yet), but it's not
apparent from the user interface that that is an option. And if I
don't guess it I can't expect my users to guess it, right? :slight_smile:

Please see the other message for the CenterPane() issue turning off
your previous calls to MaximizeButton() and so on.

As far as the double-click is concerned, this is the standard
behaviour (on Windows, at least) of all the docking libraries I know
of (Visual Studio is the first example). However, I can understand
that it is not apparent, and I welcome any suggestion to make this
option more obvious for users.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

2009/10/9 michael h <michaelkenth@gmail.com>: