how to disable maximize button?

Cameron Laird claird at starbase.neosoft.com
Sun Jul 7 16:29:25 EDT 2002


In article <mailman.1026068051.23311.python-list at python.org>,
David LeBlanc <whisper at oz.net> wrote:
>IIRC, Tk itself has the capability to trap the quit button on the window,
>and that _should_ be the same mechanism to catch a click on any of the
>window "system" buttons. (This pertains to MS-Windows.)
>
>In general terms, for MS-Windows, you have to set a handler to capture the
>WM_SYSCOMMAND message and the wparam arg will have the type of action
>(minimize, maximize, quit etc.) that's being passed.
>
>Tk has a means to set a handler for what it calls protocol events, but after
>reading the Tk code itself, it only seems to work with WM_DELETE_WINDOW -
>which curiously, isn't a standard MS-Windows event name! I tried setting an
>event handler for WM_SYSCOMMAND in Tkinter, but it never fired (also, there
>seems to be no way to get args passed with the event).
			.
			.
			.
I think we're confusing each other.  Or maybe the
software's doing it to us both.

It would make sense for the same protocol handler to
manage all the little buttons.  It doesn't, though.
Tk originated historically under X, or, more broadly,
ICCCM.  According to the experts in <URL: http://
wiki.tcl.tk/2267 >, there simply is no cross-platform
definition for much of what's requested.
-- 

Cameron Laird <Cameron at Lairds.com>
Business:  http://www.Phaseit.net
Personal:  http://starbase.neosoft.com/~claird/home.html



More information about the Python-list mailing list