Frame without Maximize button

Hi. I would create a frame without a maximize button, or with a maximize button that can’t do anything.
Why this code doesn’t work? Bye.

self.Bind(wx.EVT_MAXIMIZE
, self.doNothing)

def doNothing(self,evt):
pass

···


Sbaush

Sbaush wrote:

Hi. I would create a frame without a maximize button,

Then use a style that doesn't include the wx.MAXIMIZE_BOX flag, like this:

  wx.DEFAULT_FRAME_STYLE & ~(wx.MAXIMIZE_BOX)

or with a maximize button that can't do anything.
Why this code doesn't work?

Because EVT_MAXIMIZE is sent as a notification that the maximize is taking place, not as a way to intercept the implementation of the maximize.

···

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

Perfect, it’s what i was searching for!!

···

2006/2/18, Robin Dunn robin@alldunn.com:

Sbaush wrote:

Hi. I would create a frame without a maximize button,

Then use a style that doesn’t include the wx.MAXIMIZE_BOX flag, like this:

    wx.DEFAULT_FRAME_STYLE & ~(wx.MAXIMIZE_BOX)

or with a maximize
button that can’t do anything.
Why this code doesn’t work?

Because EVT_MAXIMIZE is sent as a notification that the maximize is
taking place, not as a way to intercept the implementation of the maximize.


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


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org


Sbaush