Borderless frame with wx.SYSTEM_MENU enabled

I've got a frame defined this way:

wx.Frame.__init__(self, None, -1, size=(300,400),
style=wx.BORDER_NONE|wx.SYSTEM_MENU|wx.MINIMIZE_BOX|
            wx.MAXIMIZE_BOX|wx.CLOSE_BOX|wx.RESIZE_BORDER)

Formelly its style was only wx.BORDER_SUNKEN, which gave me the
look'n'feel I wanted but without the context menu on taskbar.
After enabled wx.SYSTEM_MENU and its flags context menu appeared but
the frame was unable to resize, so I had to stick a wx.RESIZE_BORDER
on it.

Now, frame does what I want, has context menu and resizes, but with an
annoying border which I tried to wipe out with wx.BORDER_NONE,
wx.NO_BORDER, wx.BORDER_SUNKEN --- unsuccessful.

How can I strip this border away from the window?

Gabriel Andrade wrote:

I've got a frame defined this way:

wx.Frame.__init__(self, None, -1, size=(300,400),
style=wx.BORDER_NONE|wx.SYSTEM_MENU|wx.MINIMIZE_BOX|
            wx.MAXIMIZE_BOX|wx.CLOSE_BOX|wx.RESIZE_BORDER)

Formelly its style was only wx.BORDER_SUNKEN, which gave me the
look'n'feel I wanted but without the context menu on taskbar.
After enabled wx.SYSTEM_MENU and its flags context menu appeared but
the frame was unable to resize, so I had to stick a wx.RESIZE_BORDER
on it.

Now, frame does what I want, has context menu and resizes, but with an
annoying border which I tried to wipe out with wx.BORDER_NONE,
wx.NO_BORDER, wx.BORDER_SUNKEN --- unsuccessful.

How can I strip this border away from the window?

You can't have no border and a resize border at the same time. Either choose one or the other, or implement your own resizing. (Catch mouse events at the corners/edges of the content window, and resize the frame in response to drag events.)

···

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