dialog in Tkinter

Matthew Dixon Cowles matt at mondoinfo.com
Sat Apr 21 13:54:48 EDT 2001


On Sat, 21 Apr 2001 02:19:08 +0000 (UTC), Jacek Pop³awski
<jp at ulgo.koti.com.pl> wrote:

>I need window like this:
>
>---------------
>|    title    |
>| label entry |
>| label entry |
>| label entry |
>|     ok      |
>---------------
>
>to create it, I use:
>- topframe with title
>- dialogframe with 3 labels and 3 entries (grid)
>- botframe with ok button
>
>is it really the simplest method?

Dear Jacek,

It's probably nearly the simplest method. I suspect that you could get
rid of the frames if you used the grid geometry manager for the title
and button too and centered them using the columnspan option. Fredrik
Lundh has an example of using columnspan in his excellent An
Introduction to Tkinter at (wrapped for line length):

http://www.pythonware.com/library/
  tkinter/introduction/x4573-patterns.htm

It's about halfway down the page.

Regards,
Matt



More information about the Python-list mailing list