[Tkinter-discuss] Tkinter: window manager- .resizable
Guilherme Polo
ggpolo at gmail.com
Tue Mar 3 20:55:02 CET 2009
On Tue, Mar 3, 2009 at 1:09 PM, Madhu Subramaniam
<madhu.subramaniam at gmail.com> wrote:
> Hello,
>
> I work with python 2.5.2 and i use Tkinter for a gui app development.
> Platform with which i work is:- Linux version 2.6.9-67.ELsmp
> (brewbuilder at hs20-bc1-5.build.redhat.com) (gcc version 3.4.6 20060404 (Red
> Hat 3.4.6-8))
>
> #!/usr/local/bin/python
> #----------------------
> from Tkinter import *
> import pdb
> import os
> import string
> import threading
> from tkFileDialog import *
> from tkMessageBox import *
> import sys
>
> main_w = Tk()
> main_w.resizable(width = False, height = False)
> #main_w.maxsize(width= 1000, height = 3000)
> print main_w.resizable()
> main_w.mainloop()
>
> In the above code the command main_w.resizable.... does not work. That
> means, the user can drag the window to a larger size but cannot make the
> same smaller.
>
> On printing:
> -------------
> print main_w.resizable()
>
> i do get 0,0 as output!
Note that "resizable" is an alias to wm_resizable. All these methods
starting with wm_ actually mean: "Please window manager, can you, if
you don't mind, and if you are feeling like a good wm, do this favor
-- insert favor here -- for this window? Please ?". And there is no
guarantee that every wm will answer "yes".
>
> BUT, the resizable attribute works if i add the following line
> main_w.maxsize(width= 1000, height = 3000)
> where the values are random but should not be set to width = 0, height =0,
> in which case it (widget.resizable(width = False, height = False)) does not
> function.
>
>
> So is this a bug, or am i doing something wrong here ? :O
>
> Regards
> Thanks
> arms
>
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
>
>
--
-- Guilherme H. Polo Goncalves
More information about the Tkinter-discuss
mailing list