Odd behavior with wx.aui floating frames (visible in demo)

I'm experiencing some odd behavior with how floating frames are closed
in wx.aui applications. I did some digging and ran into a post
several years ago where Ben explained that the events for floating
frames were still being fleshed out, but I'm assuming that's been
completed.

Anyways, if you fire up the wxPython demo and run /Frames and Dialogs/
AUI_DockingWindowMgr you can see what I'm talking about. Undock the
"Tree Pane" on the left side and then close it. Now maximize "Text
Pane" and then restore its size. As soon as it is no longer maximized
the "Tree Pane" pops back up along with Dock Manager Settings. It
seems as though the close event is only hiding the floating panel and
then unmaximizing a docked window unhides everything regardless of
whether it was previously shown.

As a further wrinkle, re-dock "Tree Pane", close it, maximize "Text
Pane", and then unmaximize "Text Pane". Now "Tree Pane" doesn't show
back up.

Thoughts?

Hi,

2009/12/3 Mears:

I'm experiencing some odd behavior with how floating frames are closed
in wx.aui applications. I did some digging and ran into a post
several years ago where Ben explained that the events for floating
frames were still being fleshed out, but I'm assuming that's been
completed.

Anyways, if you fire up the wxPython demo and run /Frames and Dialogs/
AUI_DockingWindowMgr you can see what I'm talking about. Undock the
"Tree Pane" on the left side and then close it. Now maximize "Text
Pane" and then restore its size. As soon as it is no longer maximized
the "Tree Pane" pops back up along with Dock Manager Settings. It
seems as though the close event is only hiding the floating panel and
then unmaximizing a docked window unhides everything regardless of
whether it was previously shown.

As a further wrinkle, re-dock "Tree Pane", close it, maximize "Text
Pane", and then unmaximize "Text Pane". Now "Tree Pane" doesn't show
back up.

Thoughts?

It's a bug in wx.aui. I don't think I have ever seen it reported on
wxTrac, but you'd better check there as there are quite a few
wx.aui-related bugs reported:

http://trac.wxwidgets.org/query?status=accepted&status=confirmed&status=infoneeded&status=infoneeded_new&status=new&status=portneeded&status=reopened&component=wxAui&order=id&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component&desc=1

If it's not there, you might enter a bug report about it. In the
meanwhile, you can try and use wx.lib.agw.aui instead, in which many
wx.aui bugs have been fixed, plus it's pure-Python so you can hack it
as much as you want. If you give it a try, I'd suggest you to grab the
SVN version from:

http://svn.wxwidgets.org/viewvc/wx/wxPython/3rdParty/AGW/

Andrea.

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

Accidentally fired off an email to Andrea without copying the group...

Anyways, with a newer version of wx.lib.agw.aui the problems I
previously described haven't shown up, so they may have been fixed.
However, playing around with the wxPython demo, I did notice some
other issues:

1. Under Linux, if a notebook tab is dragged to a dockable position
brining up the transparent hint, further dragging of the tab will
"erase" the blue transparent background. This doesn't happen under
Windows. In the interim, is there a way to disable the behavior that
displays the tab being dragged, so that it looks like docking under
wx.aui?

2. If tabs are allowed to be floated and a transparency value has
been set for floating panes, the transparency isn't honored by tabs
that have been floated.

Thanks,
Josh

···

On Dec 3, 1:00 am, Andrea Gavana <andrea.gav...@gmail.com> wrote:

Hi,

2009/12/3 Mears:

> I'm experiencing some odd behavior with how floating frames are closed
> in wx.aui applications. I did some digging and ran into a post
> several years ago where Ben explained that the events for floating
> frames were still being fleshed out, but I'm assuming that's been
> completed.

> Anyways, if you fire up the wxPython demo and run /Frames and Dialogs/
> AUI_DockingWindowMgr you can see what I'm talking about. Undock the
> "Tree Pane" on the left side and then close it. Now maximize "Text
> Pane" and then restore its size. As soon as it is no longer maximized
> the "Tree Pane" pops back up along with Dock Manager Settings. It
> seems as though the close event is only hiding the floating panel and
> then unmaximizing a docked window unhides everything regardless of
> whether it was previously shown.

> As a further wrinkle, re-dock "Tree Pane", close it, maximize "Text
> Pane", and then unmaximize "Text Pane". Now "Tree Pane" doesn't show
> back up.

> Thoughts?

It's a bug in wx.aui. I don't think I have ever seen it reported on
wxTrac, but you'd better check there as there are quite a few
wx.aui-related bugs reported:

wxTrac has been migrated to GitHub Issues - wxWidgets

If it's not there, you might enter a bug report about it. In the
meanwhile, you can try and use wx.lib.agw.aui instead, in which many
wx.aui bugs have been fixed, plus it's pure-Python so you can hack it
as much as you want. If you give it a try, I'd suggest you to grab the
SVN version from:

http://svn.wxwidgets.org/viewvc/wx/wxPython/3rdParty/AGW/

Andrea.

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

Hi,

2009/12/3 Mears:

Accidentally fired off an email to Andrea without copying the group...

Anyways, with a newer version of wx.lib.agw.aui the problems I
previously described haven't shown up, so they may have been fixed.
However, playing around with the wxPython demo, I did notice some
other issues:

1. Under Linux, if a notebook tab is dragged to a dockable position
brining up the transparent hint, further dragging of the tab will
"erase" the blue transparent background. This doesn't happen under
Windows.

My ability to test under GTK has been greatly diminished: I can't do
it at work anymore (thanks to the inventor of Administrator
privileges) and I won't do it at home. So any help in finding out what
is going on on GTK is more than welcome.

In the interim, is there a way to disable the behavior that
displays the tab being dragged, so that it looks like docking under
wx.aui?

Yes, remove the AUI_NB_DRAW_DND_TAB style from the AuiNotebook style.

2. If tabs are allowed to be floated and a transparency value has
been set for floating panes, the transparency isn't honored by tabs
that have been floated.

Does it happen on all platforms? Do you mean "the transparency isn't
honored by the floating panes created by floating tabs"?
If this is the case, the Transparent() method for panes is your
friend, although it doesn't look that easy to use for floating tabs.
Or do you mean the transparency associated with the
AUI_MGR_TRANSPARENT_DRAG style?

As for the other message, I will be releasing a new version of AGW
with much improvements either tomorrow or (most likely) at the
beginning of next week. Specifically for AUI, there has been a great
improvement in the rendering engine so now it should be considerably
faster in rendering and re-layouting.

Other than that, if you wish to have exactly the same docking style as
wx.aui, I can easily add another style to AuiManager (something like
AUI_MGR_NO_DOCKING_GUIDES) with which no docking guides (HUD guides)
are shown. At any rate, the available docking position in
wx.lib.agw.aui are exactly the same as wx.aui, the only difference
being the docking guides being shown in wx.lib.agw.aui (which, by the
way, allow a much better positioning and finer control on docking than
the standard wx.aui blue hints).

Andrea.

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

Hi,

2009/12/3 Mears:

> Accidentally fired off an email to Andrea without copying the group...

> Anyways, with a newer version of wx.lib.agw.aui the problems I
> previously described haven't shown up, so they may have been fixed.
> However, playing around with the wxPython demo, I did notice some
> other issues:

> 1. Under Linux, if a notebook tab is dragged to a dockable position
> brining up the transparent hint, further dragging of the tab will
> "erase" the blue transparent background. This doesn't happen under
> Windows.

My ability to test under GTK has been greatly diminished: I can't do
it at work anymore (thanks to the inventor of Administrator
privileges) and I won't do it at home. So any help in finding out what
is going on on GTK is more than welcome.

You can't even use VirtualBox or VMWare at home for Linux? That bites!

> In the interim, is there a way to disable the behavior that
> displays the tab being dragged, so that it looks like docking under
> wx.aui?

Yes, remove the AUI_NB_DRAW_DND_TAB style from the AuiNotebook style.

> 2. If tabs are allowed to be floated and a transparency value has
> been set for floating panes, the transparency isn't honored by tabs
> that have been floated.

Does it happen on all platforms? Do you mean "the transparency isn't
honored by the floating panes created by floating tabs"?
If this is the case, the Transparent() method for panes is your
friend, although it doesn't look that easy to use for floating tabs.
Or do you mean the transparency associated with the
AUI_MGR_TRANSPARENT_DRAG style?

As for the other message, I will be releasing a new version of AGW
with much improvements either tomorrow or (most likely) at the
beginning of next week. Specifically for AUI, there has been a great
improvement in the rendering engine so now it should be considerably
faster in rendering and re-layouting.

Other than that, if you wish to have exactly the same docking style as
wx.aui, I can easily add another style to AuiManager (something like
AUI_MGR_NO_DOCKING_GUIDES) with which no docking guides (HUD guides)
are shown. At any rate, the available docking position in
wx.lib.agw.aui are exactly the same as wx.aui, the only difference
being the docking guides being shown in wx.lib.agw.aui (which, by the
way, allow a much better positioning and finer control on docking than
the standard wx.aui blue hints).

Andrea.

Are you changing the API of Flatnotebook or the notebook in your AUI?
I was going to work on a tutorial for those in the next couple of
days, but I can hold off if you're changing things up.

Thanks for the hard work!

···

On Dec 3, 4:15 pm, Andrea Gavana <andrea.gav...@gmail.com> wrote:

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

Hi Mike,

2009/12/3 Mike Driscoll:

Hi,

2009/12/3 Mears:

> Accidentally fired off an email to Andrea without copying the group...

> Anyways, with a newer version of wx.lib.agw.aui the problems I
> previously described haven't shown up, so they may have been fixed.
> However, playing around with the wxPython demo, I did notice some
> other issues:

> 1. Under Linux, if a notebook tab is dragged to a dockable position
> brining up the transparent hint, further dragging of the tab will
> "erase" the blue transparent background. This doesn't happen under
> Windows.

My ability to test under GTK has been greatly diminished: I can't do
it at work anymore (thanks to the inventor of Administrator
privileges) and I won't do it at home. So any help in finding out what
is going on on GTK is more than welcome.

You can't even use VirtualBox or VMWare at home for Linux? That bites!

No, it's not that, I just want to stay with my beautiful daughter and
my wife when I am at home :smiley:

> In the interim, is there a way to disable the behavior that
> displays the tab being dragged, so that it looks like docking under
> wx.aui?

Yes, remove the AUI_NB_DRAW_DND_TAB style from the AuiNotebook style.

> 2. If tabs are allowed to be floated and a transparency value has
> been set for floating panes, the transparency isn't honored by tabs
> that have been floated.

Does it happen on all platforms? Do you mean "the transparency isn't
honored by the floating panes created by floating tabs"?
If this is the case, the Transparent() method for panes is your
friend, although it doesn't look that easy to use for floating tabs.
Or do you mean the transparency associated with the
AUI_MGR_TRANSPARENT_DRAG style?

As for the other message, I will be releasing a new version of AGW
with much improvements either tomorrow or (most likely) at the
beginning of next week. Specifically for AUI, there has been a great
improvement in the rendering engine so now it should be considerably
faster in rendering and re-layouting.

Other than that, if you wish to have exactly the same docking style as
wx.aui, I can easily add another style to AuiManager (something like
AUI_MGR_NO_DOCKING_GUIDES) with which no docking guides (HUD guides)
are shown. At any rate, the available docking position in
wx.lib.agw.aui are exactly the same as wx.aui, the only difference
being the docking guides being shown in wx.lib.agw.aui (which, by the
way, allow a much better positioning and finer control on docking than
the standard wx.aui blue hints).

Andrea.

Are you changing the API of Flatnotebook or the notebook in your AUI?
I was going to work on a tutorial for those in the next couple of
days, but I can hold off if you're changing things up.

No, no changes to the API, just improvements in the layouting and
repainting routines, plus a huge documentation effort for AGW which is
now 99% finished. I am just putting the finishing touches (and
fighting with Sphinx), but I am almost done. I am curious to see your
tutorials, I am always happy to scan through your blog looking at
examples and code snippets, mainly when I am in search of new ideas
(meaning always :-D)

Andrea.

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

···

On Dec 3, 4:15 pm, Andrea Gavana <andrea.gav...@gmail.com> wrote:

Hi Andrea!

Hi Mike,

2009/12/3 Mike Driscoll:

Hi,

2009/12/3 Mears:

Accidentally fired off an email to Andrea without copying the group…

Anyways, with a newer version of wx.lib.agw.aui the problems I

previously described haven’t shown up, so they may have been fixed.

However, playing around with the wxPython demo, I did notice some

other issues:

  1. Under Linux, if a notebook tab is dragged to a dockable position

brining up the transparent hint, further dragging of the tab will

“erase” the blue transparent background. This doesn’t happen under

Windows.

My ability to test under GTK has been greatly diminished: I can’t do

it at work anymore (thanks to the inventor of Administrator

privileges) and I won’t do it at home. So any help in finding out what

is going on on GTK is more than welcome.

You can’t even use VirtualBox or VMWare at home for Linux? That bites!

No, it’s not that, I just want to stay with my beautiful daughter and

my wife when I am at home :smiley:

Good for you! There are way too many guys who would rather do other things than be with their family.

Are you changing the API of Flatnotebook or the notebook in your AUI?

I was going to work on a tutorial for those in the next couple of

days, but I can hold off if you’re changing things up.

No, no changes to the API, just improvements in the layouting and

repainting routines, plus a huge documentation effort for AGW which is

now 99% finished. I am just putting the finishing touches (and

fighting with Sphinx), but I am almost done. I am curious to see your

tutorials, I am always happy to scan through your blog looking at

examples and code snippets, mainly when I am in search of new ideas

(meaning always :-D)

Andrea.

Really? That’s cool! I’ll be working on some code examples for the tutorial which will probably borrow from your demo (and be attributed) and once that’s done, I’ll write the tutorials. The coding part usually takes the most planning. I estimate a night or three to get it done. I look forward to your comments (if any).

···

On Thu, Dec 3, 2009 at 4:47 PM, Andrea Gavana andrea.gavana@gmail.com wrote:

On Dec 3, 4:15 pm, Andrea Gavana andrea.gav...@gmail.com wrote:


Mike Driscoll

Blog: http://blog.pythonlibrary.org

Yes, remove the AUI_NB_DRAW_DND_TAB style from the AuiNotebook style.

Ok, this does suffice as a workaround for the drawing problem I
described. I prefer this style anyways.

> 2. If tabs are allowed to be floated and a transparency value has
> been set for floating panes, the transparency isn't honored by tabs
> that have been floated.

Does it happen on all platforms? Do you mean "the transparency isn't
honored by the floating panes created by floating tabs"?
If this is the case, the Transparent() method for panes is your
friend, although it doesn't look that easy to use for floating tabs.
Or do you mean the transparency associated with the
AUI_MGR_TRANSPARENT_DRAG style?

Yes, it happens on all platforms, and yes I mean "the transparency
isn't honored by the floating panes created by floating tabs."

I switched my application to agw.aui, and I ran into another problem
that is present under both Linux and Windows. If you launch the agw
AUI demo, maximize the "Tree Pane" by clicking the maximize button,
and then undock it by double clicking the caption. You'll notice that
the screen doesn't redraw correctly. Under windows, the application
doesn't seem to recover. Under linux I can get it to refresh &
recover by dragging the application.

···

On Dec 3, 3:15 pm, Andrea Gavana <andrea.gav...@gmail.com> wrote:

One other thing I noticed is that if I add a panel to an AuiNoteBook
that uses an AuiManager and dock panes in that page that can be
minimized, that functionality doesn't work correctly. The little
toolbar will show up, but attempting to click on the maximize icon
results in no action. If I try to drag it, the following exception is
thrown:

Traceback (most recent call last):
  File "/opt/virtutech/simics/simics-base/amd64-linux/lib/python2.5/
site-packages/wx-2.8-gtk2-unicode/wx/lib/agw/aui/auibar.py", line
3272, in OnLeftDown
    manager.OnGripperClicked(self, managerClientPt, wx.Point
(x_drag_offset, y_drag_offset))
  File "/opt/virtutech/simics/simics-base/amd64-linux/lib/python2.5/
site-packages/wx-2.8-gtk2-unicode/wx/lib/agw/aui/framemanager.py",
line 7491, in OnGripperClicked
    raise Exception("Pane window not found")
Exception: Pane window not found
Traceback (most recent call last):
  File "/opt/virtutech/simics/simics-base/amd64-linux/lib/python2.5/
site-packages/wx-2.8-gtk2-unicode/wx/lib/agw/aui/auibar.py", line
3272, in OnLeftDown
    manager.OnGripperClicked(self, managerClientPt, wx.Point
(x_drag_offset, y_drag_offset))
  File "/opt/virtutech/simics/simics-base/amd64-linux/lib/python2.5/
site-packages/wx-2.8-gtk2-unicode/wx/lib/agw/aui/framemanager.py",
line 7491, in OnGripperClicked
    raise Exception("Pane window not found")
Exception: Pane window not found

···

On Dec 4, 11:01 am, Mears <joshuadavid...@gmail.com> wrote:

On Dec 3, 3:15 pm, Andrea Gavana <andrea.gav...@gmail.com> wrote:

> Yes, remove the AUI_NB_DRAW_DND_TAB style from the AuiNotebook style.

Ok, this does suffice as a workaround for the drawing problem I
described. I prefer this style anyways.

> > 2. If tabs are allowed to be floated and a transparency value has
> > been set for floating panes, the transparency isn't honored by tabs
> > that have been floated.

> Does it happen on all platforms? Do you mean "the transparency isn't
> honored by the floating panes created by floating tabs"?
> If this is the case, the Transparent() method for panes is your
> friend, although it doesn't look that easy to use for floating tabs.
> Or do you mean the transparency associated with the
> AUI_MGR_TRANSPARENT_DRAG style?

Yes, it happens on all platforms, and yes I mean "the transparency
isn't honored by the floating panes created by floating tabs."

I switched my application to agw.aui, and I ran into another problem
that is present under both Linux and Windows. If you launch the agw
AUI demo, maximize the "Tree Pane" by clicking the maximize button,
and then undock it by double clicking the caption. You'll notice that
the screen doesn't redraw correctly. Under windows, the application
doesn't seem to recover. Under linux I can get it to refresh &
recover by dragging the application.

Hi,

Yes, remove the AUI_NB_DRAW_DND_TAB style from the AuiNotebook style.

Ok, this does suffice as a workaround for the drawing problem I
described. I prefer this style anyways.

> 2. If tabs are allowed to be floated and a transparency value has
> been set for floating panes, the transparency isn't honored by tabs
> that have been floated.

Does it happen on all platforms? Do you mean "the transparency isn't
honored by the floating panes created by floating tabs"?
If this is the case, the Transparent() method for panes is your
friend, although it doesn't look that easy to use for floating tabs.
Or do you mean the transparency associated with the
AUI_MGR_TRANSPARENT_DRAG style?

Yes, it happens on all platforms, and yes I mean "the transparency
isn't honored by the floating panes created by floating tabs."

It works for me when I use the style AUI_MGR_TRANSPARENT_DRAG and I
create a new pane by floating a tab *outside* a notebook (float single
tab style). If I am misunderstanding your problem, please restate it
by providing a small sample app or the exact steps to reproduce it
using the AUI demo (actions and visual effects you were expecting but
you are not seeing).

I switched my application to agw.aui, and I ran into another problem
that is present under both Linux and Windows. If you launch the agw
AUI demo, maximize the "Tree Pane" by clicking the maximize button,
and then undock it by double clicking the caption. You'll notice that
the screen doesn't redraw correctly. Under windows, the application
doesn't seem to recover. Under linux I can get it to refresh &
recover by dragging the application.

This is a bug, I'll correct it when I get back to work.

As for the other problem:

One other thing I noticed is that if I add a panel to an AuiNoteBook
that uses an AuiManager and dock panes in that page that can be
minimized, that functionality doesn't work correctly. The little
toolbar will show up, but attempting to click on the maximize icon
results in no action. If I try to drag it, the following exception is
thrown:

Traceback (most recent call last):

<snip>

File "/opt/virtutech/simics/simics-base/amd64-linux/lib/python2.5/
site-packages/wx-2.8-gtk2-unicode/wx/lib/agw/aui/framemanager.py",
line 7491, in OnGripperClicked
   raise Exception("Pane window not found")
Exception: Pane window not found

This bug has been fixed (*should* have been fixed) some time ago. See
this ticket:

http://trac.wxwidgets.org/ticket/11039

Together with the test sample attached to the ticket. Are yo able to
crash AUI with that? Are you sure you are using the latest SVN version
of agw.aui?

Andrea.

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

···

2009/12/4 Mears <joshuadavidson@gmail.com>:

On Dec 3, 3:15 pm, Andrea Gavana <andrea.gav...@gmail.com> wrote: