[Tutor] ComboBox with Tkinter

Michael Lange klappnase at freenet.de
Sat Jul 17 02:50:31 CEST 2004


On Mon, 5 Jul 2004 21:58:42 +0200
"Puki" <Puki at join2000.de> wrote:

Hi Puki,

>  
> and I thought a combobox should act the same way:
> self.cb = Combobox(frame7, -1, choices['choice1','choice2'], value=
> 'combobox')???
>  
>  

unfortunately there is no combobox widget in the standard Tkinter module; there are two extensions
for Tkinter that have comboboxes (and many other extra widgets) for Tkinter:

Pmw (<http://pmw.sourceforge.net>) is completely written in Python and therefore it is no problem
to install it on any system with a running Python/Tkinter and it's very well documented.

Tix (<http://tix.sourceforge.net>) is (in my opinion) a little nicer than Pmw and more powerful
but it was written for tcl/tk in the first place, so it must be compiled first and may therefore
be problematic to install at least on windows (on linux it should be already included in the distribution).
Tix doesn't also come with such a nice manual as Pmw, so maybe Pmw might be the better choice for a start.

If you need some documentation for the standard Tkinter module you can start with Frederic Lundh's
excellent "Introduction to Tkinter" (<http://www.pythonware.com/library/tkinter/introduction/>)

I hope this helps

Michael


More information about the Tutor mailing list