how to disable maximize button?

Sean 'Shaleh' Perry shalehperry at attbi.com
Fri Jul 5 17:29:29 EDT 2002


On 05-Jul-2002 Alex Martelli wrote:
> jubafre at zipmail.com.br wrote:
> 
>> how i can disable de maximise button in tkinter, i don´t want the user
>> modific the size of the window, i want a real size of window, how can i do
>> it???
> 
> You can remove all decorations:
> 
> import Tkinter
> root = Tkinter.Tk()
> root.overrideredirect(1)
> 

override_redirect means "I can handle myself, leave me alone".  The window
manager will not touch your window.  It will be up to you to handle moving it,
showing a title, etc.

> Apart from this, you may choose to fix the size:
> 
> import Tkinter
> root = Tkinter.Tk()
> root.resizable(0,0)
> 
> 
> I know of no way to affect the maximize button ONLY, without also
> affecting other ways to resize the window, but then from your post's
> text I don't see why you should ONLY want to affect said button.
> 
> 
> Alex
> 
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list