Tkinter question

Greg McFarlane gregm at iname.com
Thu May 20 23:55:45 EDT 1999


Why do you want to make restrictions on what your users can do with
your application?

It is extremely annoying to have a window on your screen that you
cannot resize.  It may be covering some other window I want to look
at, or I may want to expand it to see more of the scrollable parts. 
If you use grid instead of pack, it is easier to write your code so
that the window still looks beautiful even if your users resize it.

More power to the people!

On 20 May, Huaming Wang wrote:
> Thank you very much. My source code is a monster, about 2000 lines, so I
> think it's not good to post it here. But I can use several lines in
> interactive mode to explain my problem
> >>>from Tkinter import *
> >>>basewindow = Tk()
> >>>frame = Frame(basewindow)    #make a frame instance
> >>>frame.pack(expand=NO, fill=NONE)
> >>>button = Button(frame, text="Hello")
> >>>button.pack(expand=NO, fill=NONE)
> Then we can get a window with a button on it, but I still can change the
> size of base window, do you know how to make it fixed?
> Thanks a lot!
> Huaming
> 
> 
> wpeloqui at ismi.net wrote:
> 
> > Hi,
> >
> > You need to use frames to contain your widgits and then use the expand
> > and fill options in pack(). I spent a lot of time getting my
> > application to resize and look good. If you post some examples, I can
> > get into more detail.
> >
> > Willie
> >
> > In article <37442C9D.8AB8A7CE at casbah.acns.nwu.edu>,
> >   Huaming Wang <hwa786 at casbah.acns.nwu.edu> wrote:
> > > Hello, everybody:
> > >
> > > I have a problem with Tkinter when I am working with a project. I
> > made a
> > > window showing on the screen, but I found if I enlarge the window by
> > > mouse, it gets ugly, so I want to figure out how to make the base
> > window
> > > fixed, but I couldn't find anything useful in starship website and
> > > Tcl/Tk manual page. Could somebody help me? Thanks a lot!
> > >
> > > Huaming
> > >
> > >
> >
> > --
> >
> > Willie Peloquin
> > Senior Software Engineer - Contract
> > http://www.ismi.net/~wpeloqui
> >
> > "It is unwise to
> >
> > --== Sent via Deja.com http://www.deja.com/ ==--
> > ---Share what you know. Learn what you don't.---
> 
> 
> 

-- 
Greg McFarlane:    INMS Telstra Australia (gregm at iname.com)
Today's forecast:  Sunny, with occasional cloudy periods and a chance
		   of rain in some areas.




More information about the Python-list mailing list