Event for clicking the edge of frame

Is there any way to execute code when the outside of a frame is clicked to resize the frame? The size event only triggers when the size actually changes but I want something to trigger even if it doesn’t resize.

David Yan wrote:

Is there any way to execute code when the outside of a frame is clicked to resize the frame? The size event only triggers when the size actually changes but I want something to trigger even if it doesn't resize.

You can probably approximate it using the mouse position and binding to one of the mouse button click events. Something along the lines of, run the code if the mouse position is at (x,y) AND EVT_LEFT_DOWN or some such.

You might also be able to use a focus or window enter event somehow.

···

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

Blog: http://blog.pythonlibrary.org

David Yan wrote:

Is there any way to execute code when the outside of a frame is clicked to resize the frame? The size event only triggers when the size actually changes but I want something to trigger even if it doesn't resize.

wx doesn't provide anything like that, but you may be able to get at it using native code. For example Windows has some "WM_NC_*" message types, where NC stands for Non-Client.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!