Hello, everybody!
Now I currently use such code with usual button for run and process
response file chooser dialog.
Some times ago I found in PyGTK reference new gtk.FileChooserButton (
http://pygtk.org/docs/pygtk/class-gtkfilechooserbutton.html)
but from manual I didn't understand how to use it.
Can you give me some example of it?
# ...
fileselButton = gtk.Button("Browse")
fileselButton.connect("clicked", self.open_file_dialog)
# ...
def open_file_dialog(self, widget):
self.chooser = gtk.FileChooserDialog(title=None,action=
gtk.FILE_CHOOSER_ACTION_OPEN,
buttons=(gtk.STOCK_CANCEL,
gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK))
self.chooser.set_current_folder(os.environ['HOME'])
self.chooser.set_default_response(gtk.RESPONSE_OK)
response = self.chooser.run()
if response == gtk.RESPONSE_OK:
# some actions
self.chooser.destroy()
--
Thanks, Taras
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/