Pmw and Tkinter

Robert Roy rjroy at takingcontrol.com
Sat May 27 11:41:56 EDT 2000


On Fri, 26 May 2000 12:05:01 -0700, "Grzegorz Dostatni"
<rspy at hotmail.com> wrote:

>Hello...
>
>I'm new to Python.  I'm working on a project that uses Tkinter and Pmw.
>Here's my question:
>Is it possible to set the minimum size of the window?  How?  I tried using
>width and height attributes.  Those work fine as long as there is nothing on
>the window. (I'm using a grid layout).  As soon as I put a button, the
>window resizes itself...
>What am I doing wrong?  I thought of using the 0'th row and column to put an
>invisible object of given size (something 1x n pixels) to guarantee a
>minimum size.
>
>Thanks in advance
>
>Grzegorz Dostatni
>
import Tkinter
root = Tkinter.Tk()
root.minsize(400,200)
Tkinter.Button(root, text='Hello").pack()
root.mainloop()


also see
maxsize and geometry

Bob



More information about the Python-list mailing list