File open dialog : Common Dialog « GUI Tk « Python






File open dialog

File open dialog

from Tkinter import *
from tkMessageBox import *
from tkColorChooser import askcolor              
from tkFileDialog   import askopenfilename      

def callback():
    askopenfilename() 
    
    
errmsg = 'Error!'
Button(text='Quit', command=callback).pack(fill=X)
Button(text='Spam', command=(lambda: showerror('Spam', errmsg))).pack(fill=X)
mainloop()


           
       








Related examples in the same category

1.OK cancel dialogOK cancel dialog
2.Question dialogQuestion dialog
3.Error dialogError dialog
4.Entry dialogEntry dialog
5.Color chooser dialogColor chooser dialog
6.Buildin dialogs: warning dialog, info dialog and error dialogBuildin dialogs: warning dialog, info dialog and error dialog
7.YES NO CANCEL dialogYES NO CANCEL dialog
8.Set ColorSet Color