Re: prevent a wx.window from resizing

"Bryan Bulten" <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.wxnet
Message-ID <[email protected]>
Hello,

> Hi Alexander sorry if i am being a PITA :p I would like to ask if it is
> possible to prevent a wx.window from being resized and also hiding the
> maximize button because the minsize and maxsize properties are readonly.
> thnx again for your help

To hide the Min/Max size buttons, specify the Window flags in the
constructor using the following:

  wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX

This is the same as the wxDEFAULT_FRAME_STYLE, minus the
wxMINIMIZE_BOX and wxMAXIMIZE_BOX flags.

Ommitting wxRESIZE_BORDER may prevent the window from being resizable,
I can't recall.  You can also prevent resizing by handling the EVT_SIZE
event (Window.OnSize event, I think), and call Event.Skip(true) to tell
wxWidgets not to do anything with the request.


Cheers.

-- 
Bryan Bulten
http://bulten.ca/
http://wxnet.sourceforge.net/



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.