Tix.FileSelectDialog wait for user?

H

harold fellermann

Hi,

I have a question concerning the Tix file select mechanisms.
Unfortunately,
I have very little experience with neither tk, Tkinter nor Tix.
Somewhere
in my GUI I have a save button. What I want is that pressing the button
opens a file requester. The user can either select a filename or cancel
the
action. I have found Tix.FileSelectDialog which seems to be nice for
the task.
But how can I use this dialog after all? how can I e.g. attach a
command to the
"Ok"-Button. Or isn't there a simple function that
1.) opens the requester
2.) waits until the requester is closed
3.) returns either a string (filename) or None (canceled)

so that I can just write something like:
fname = FileSelect()
if fname != None : do_something_with(fname)


Damn, I hate Tk's and Tix' so called "manuals":
The Tk manual takes a user and makes it into a grammar parser. Further
information,
like common usage or examples, that might normally be expected in a
manual cannot be
found with no additional arguments.
The Tk manual returns the completely clueless programmer.

Start to like pydoc(Tkinter) and pydoc(Tix), though :)

- harold -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top