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 -
--
"Mr Ghandi, what do you think of western civilization?"
"Oh, this would be a great idea."