Tix.FileSelectDialog wait for user?

Discussion in 'Python' started by harold fellermann, Jan 13, 2005.

  1. 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."
     
    harold fellermann, Jan 13, 2005
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Edward
    Replies:
    3
    Views:
    391
    Edward
    Jun 9, 2004
  2. batham
    Replies:
    1
    Views:
    777
    Wilco Bauwer
    Feb 28, 2005
  3. Tobias Merler
    Replies:
    0
    Views:
    530
    Tobias Merler
    Aug 25, 2003
  4. Huey

    How to make "fork/wait" to WAIT longer?

    Huey, Mar 1, 2004, in forum: C Programming
    Replies:
    1
    Views:
    2,209
    -berlin.de
    Mar 1, 2004
  5. Helmut Jarausch
    Replies:
    0
    Views:
    605
    Helmut Jarausch
    Jul 17, 2003
  6. andypop
    Replies:
    0
    Views:
    2,345
    andypop
    Dec 7, 2009
  7. Lisa
    Replies:
    1
    Views:
    156
    Daniel Kirsch
    Dec 15, 2004
  8. bhabs
    Replies:
    2
    Views:
    596
    Tad J McClellan
    Feb 13, 2008
Loading...