wx.Frame - sizing event

First of all thanks to Robin for the EventWatcher in WIT - great help!

When I click on the wx.Frame's minimize button I get an event, when I maximize I get an event but when I click on the 'restore down' (the middle one of the three buttons on the frame) I don't get any size event.

I am obviously doing something wrong as in a small sample I see a size event - but not in my application. What am I doing that an event is not fired? I checked that I have only one handler for evt_size but I never get to it.

The problem I am having is that when the application gets 'restored down' my AUI panes are not resizing - so was hoping to catch a size event and then force a resize. Which is probably not event needed if I figure out what I am doing to suppress the size event.

Werner

Werner F. Bruhin wrote:

First of all thanks to Robin for the EventWatcher in WIT - great help!

When I click on the wx.Frame's minimize button I get an event, when I maximize I get an event but when I click on the 'restore down' (the middle one of the three buttons on the frame) I don't get any size event.

I am obviously doing something wrong as in a small sample I see a size event - but not in my application. What am I doing that an event is not fired? I checked that I have only one handler for evt_size but I never get to it.

Have you tried a sample with and without AUI? Perhaps it is catching and not Skip()ing a size event in some cases.

The problem I am having is that when the application gets 'restored down' my AUI panes are not resizing - so was hoping to catch a size event and then force a resize. Which is probably not event needed if I figure out what I am doing to suppress the size event.

I'm not sure what would cause that, unless something earlier in the chain is dealing with the event before it gets to your handler. All I can suggest at this point is to add the relevant things from your main app one at a time to your sample until the problem happens, then narrow in on the last thing added.

···

--
Robin Dunn
Software Craftsman

Robin Dunn wrote:

Werner F. Bruhin wrote:
  

First of all thanks to Robin for the EventWatcher in WIT - great help!

When I click on the wx.Frame's minimize button I get an event, when I maximize I get an event but when I click on the 'restore down' (the middle one of the three buttons on the frame) I don't get any size event.

I am obviously doing something wrong as in a small sample I see a size event - but not in my application. What am I doing that an event is not fired? I checked that I have only one handler for evt_size but I never get to it.
    
Have you tried a sample with and without AUI? Perhaps it is catching and not Skip()ing a size event in some cases.
  

My sample is using AUI, it was actually the test for checking that AUI would work for me.

  

The problem I am having is that when the application gets 'restored down' my AUI panes are not resizing - so was hoping to catch a size event and then force a resize. Which is probably not event needed if I figure out what I am doing to suppress the size event.
    
I'm not sure what would cause that, unless something earlier in the chain is dealing with the event before it gets to your handler.

What in the chain could catch the event?

The problem is on the TopWindow, anyhow I checked the whole application folder and I don't see any which are related to the TopWindow/Main Frame of the application.

  All I can suggest at this point is to add the relevant things from your main app one at a time to your sample until the problem happens, then narrow in on the last thing added.
  

I started doing this, without success. Will have to just take the app and start stripping things until I see the event happening.

Werner

Robin Dunn wrote:

Werner F. Bruhin wrote:
  

First of all thanks to Robin for the EventWatcher in WIT - great help!

When I click on the wx.Frame's minimize button I get an event, when I maximize I get an event but when I click on the 'restore down' (the middle one of the three buttons on the frame) I don't get any size event.

I am obviously doing something wrong as in a small sample I see a size event - but not in my application. What am I doing that an event is not fired? I checked that I have only one handler for evt_size but I never get to it.
    
Have you tried a sample with and without AUI? Perhaps it is catching and not Skip()ing a size event in some cases.
  

It is related to aui.

With wx.lib.agw.aui if the managed window is a Frame it eats up the event, this does not happen with wx.aui.

The work around is to insert a wx.Panel and have aui manage the panel instead of the frame.

Attached is a small sample, just change the import statement.

Werner

auiMinimal.py (1.79 KB)

Hi Werner,

2009/7/25 Werner F. Bruhin:

Robin Dunn wrote:

Werner F. Bruhin wrote:

First of all thanks to Robin for the EventWatcher in WIT - great help!

When I click on the wx.Frame's minimize button I get an event, when I
maximize I get an event but when I click on the 'restore down' (the
middle one of the three buttons on the frame) I don't get any size event.

I am obviously doing something wrong as in a small sample I see a size
event - but not in my application. What am I doing that an event is not
fired? I checked that I have only one handler for evt_size but I never
get to it.

Have you tried a sample with and without AUI? Perhaps it is catching
and not Skip()ing a size event in some cases.

It is related to aui.

With wx.lib.agw.aui if the managed window is a Frame it eats up the
event, this does not happen with wx.aui.

The work around is to insert a wx.Panel and have aui manage the panel
instead of the frame.

Attached is a small sample, just change the import statement.

Please see the comment/question I left on the Trac:

http://trac.wxwidgets.org/ticket/11024#comment:1

Andrea.

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

Hi Andrea,

Andrea Gavana wrote:
...

It is related to aui.

With wx.lib.agw.aui if the managed window is a Frame it eats up the
event, this does not happen with wx.aui.

The work around is to insert a wx.Panel and have aui manage the panel
instead of the frame.

Attached is a small sample, just change the import statement.
    
Please see the comment/question I left on the Trac:

wxTrac has been migrated to GitHub Issues - wxWidgets
  

This is fixed for me with your latest changes in SVN.

Werner