I find that windows are only resizeable when I use the wxRESIZE_BORDER
window style. This is in the default style for frames, but not for
dialogs. (Are there systems where wxRESIZE_BORDER has no effect?)
You can also use SetSizeHints to set the minimum/maximum size to the
same value, thus preventing resizing even if you have a resizing border.
Markus
···
Am Fre, den 02.01.2004 schrieb Fuming Wang um 14:38:
Hi,
I need to make a wx.Frame or wx.Dialog 'fixed' on the
screen, so that users will not be able to move it or
resize it. Anyone can give me some help?
I need to make a wx.Frame or wx.Dialog 'fixed' on the
screen, so that users will not be able to move it or
resize it. Anyone can give me some help?
There are two ways to make a frame non-resizable. You can either use SetSizeHints in which case the frame will still look normal but can't be resized, or you can create the frame without the wxRESIZE_BORDER style in which case it will look a little different depening on platform.
The only way I know of to make a frame non-movebale is to ensure that it has no titlebar at all. Unfortunatly this means that you can also have no system menu, min/max box or close box. Try using style=0 (or use some BORDER style) and see what you get. In 2.5 for Windows there is a EVT_MOVING event (and EVT_SIZING) that will let you do something before the move happens, but it's not there yet for the other platforms.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!