Tkinter: how to create (modal) dialogs a la tk_dialog?

Olaf Dietrich odt at dtrx.de
Wed Oct 27 09:52:50 EDT 2010


I'm stuck with a probably simple task: How can I create
a user defined dialog (similar to tkFileDialog.askdirectory(),
but with my own set of options/selections)?

In Tk, that's

  set reply [tk_dialog .foo "The Title" "Which one?" {} 0 \
               Yes No "I'm not sure"]

What would be the equivalent with Tkinter?


And it would be even nicer to have a dialog with a
listbox-lie selection instead of separate buttons
for each choice? How could that be done?


Thanks for any suggestions!

Olaf



More information about the Python-list mailing list