Search code examples
pythonwindowswxpythonwxwidgets

wxpython Disable Frame Resizing while keeping the RESIZE_BORDER style border


The style I like is: wx.STAY_ON_TOP | wx.RESIZE_BORDER

wxPython Disable Frame Resizing Following this suggestion the border vanishes. But I want to keep the style of RESIZE_BORDER just not its functionality.

This also does what I want:

self.SetMinSize(self.GetSize())
self.SetMaxSize(self.GetSize())

But it keeps the annoying re-size mouse pointer when hovering over the border.

I am trying to create a control similar to the volume control in windows 7 tray.

Thanks!


Solution

  • wxRESIZE_BORDER is not just some ornamentation, it indicates to the user that the window can be resized. Why do you want to lie to the user? If your window is not resizeable, don't use this style. There are other styles you may use to change the border appearance and you probably want to use a wxPopupWindow and not a usual wxFrame anyhow for something like volume control.