Tkinter Base Window

Russell E. Owen no at spam.invalid
Sat Jan 24 14:27:55 EST 2004


In article <401257c4$0$26116$afc38c87 at news.optusnet.com.au>,
 Peter Moscatt <pgmoscatt at optushome.com.au> wrote:

>Ok....  I am pretty new to Python (as you may have gathered from previous
>posts).  So now it time for another one of my ridiculous questions....  :-)
>
>When using 'Tkinter', what is used as the base window to work from, meaning
>what widget do I use to place all other widgets onto to create a custom
>dialog ?

You'll want to create a new Toplevel (the term Tkinter uses for the 
thing many of us think of as a window). If you want the window to be 
modal you'll have to do a few extra things.

Tkinter already includes a lot of modules for creating dialogs. Find the 
file Tkinter.py (in lib-tk in with your other python libraries) and look 
at some of its fellows such as tkFileDialog.py, tkSimpleDialog.py and a 
host of others with dialog in their names. Read the source code to see 
how to use it (or import each package and type help(package_name)). You 
may find exactly what you want, and if not, at least you'll see some 
examples.

-- Russell



More information about the Python-list mailing list