how to bind a command to the open button

Discussion in 'Python' started by susan, Dec 12, 2006.

  1. susan

    susan Guest

    Hi,
    Anybody knows how to bind a command to the open button at a file
    browser dialog? I want to add selected files to a scrolllist.

    Like this:

    def browseFile(self):

    file = askopenfilename(filetypes = [("TDF Files", "*.TDF"),
    ("All Files", "*.*")],multiple=1)

    ?.....

    Thanks!
     
    susan, Dec 12, 2006
    #1
    1. Advertising

  2. susan

    hg Guest

    susan wrote:

    > Hi,
    > Anybody knows how to bind a command to the open button at a file
    > browser dialog? I want to add selected files to a scrolllist.
    >
    > Like this:
    >
    > def browseFile(self):
    >
    > file = askopenfilename(filetypes = [("TDF Files", "*.TDF"),
    > ("All Files", "*.*")],multiple=1)
    >
    > ?.....
    >
    > Thanks!


    why don't you add the result "file" to the list ?
     
    hg, Dec 12, 2006
    #2
    1. Advertising

  3. susan

    susan Guest

    Thank you very much, after I asked the question, I realized it has a
    simple answer, exactly in your reply:)
    hg wrote:
    > susan wrote:
    >
    > > Hi,
    > > Anybody knows how to bind a command to the open button at a file
    > > browser dialog? I want to add selected files to a scrolllist.
    > >
    > > Like this:
    > >
    > > def browseFile(self):
    > >
    > > file = askopenfilename(filetypes = [("TDF Files", "*.TDF"),
    > > ("All Files", "*.*")],multiple=1)
    > >
    > > ?.....
    > >
    > > Thanks!

    >
    > why don't you add the result "file" to the list ?
     
    susan, Dec 14, 2006
    #3
    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. mr2_93
    Replies:
    1
    Views:
    3,625
    mr2_93
    Oct 2, 2005
  2. Replies:
    0
    Views:
    506
  3. Replies:
    0
    Views:
    598
  4. chandan
    Replies:
    0
    Views:
    986
    chandan
    Nov 17, 2008
  5. Softworks

    Command Button to Open Window

    Softworks, Jan 11, 2007, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    901
    Teemu Keiski
    Jan 27, 2007
Loading...

Share This Page