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. Advertising

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. Huey

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

    Huey, Mar 1, 2004, in forum: C Programming
    Replies:
    1
    Views:
    1,968
    -berlin.de
    Mar 1, 2004
  2. Helmut Jarausch
    Replies:
    0
    Views:
    437
    Helmut Jarausch
    Jul 17, 2003
  3. Josh

    Tix + Python + Windows?

    Josh, Aug 13, 2003, in forum: Python
    Replies:
    2
    Views:
    693
    Kevin Mote
    Sep 5, 2003
  4. Hank

    installing Tix

    Hank, Aug 19, 2003, in forum: Python
    Replies:
    1
    Views:
    383
    Christos TZOTZIOY Georgiou
    Aug 23, 2003
  5. Sanjay Minni
    Replies:
    0
    Views:
    349
    Sanjay Minni
    Sep 1, 2003
Loading...

Share This Page