embedding filedialog in a frame in tkinter
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Sat Dec 15 21:17:43 EST 2007
More information about the Python-list mailing list
Sat Dec 15 21:17:43 EST 2007
- Previous message (by thread): Inter-process communication, how?
- Next message (by thread): embedding filedialog in a frame in tkinter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 15 dic, 04:30, "dev... at gmail.com" <dev... at gmail.com> wrote: > i am trying out tkinter to make a gui..i want to have a frame with an > embedded file explorer next to a 'open directory' label..i tried out > FileDialog and tkFileDialog methods but they open as pop up dialogs.. > how do i make this packed into the frame the way button and other > widgets can be packed? i am a newbie to tkinter.. Try using Tix, a Tkinter extension included in the Python library. It provides a DirList widget: <code> import Tix class App: def __init__(self, master): frame = Tix.Frame(master) frame.pack() dirlist = Tix.DirList(frame, value=r"f:\download\temp", command=self.showdir) dirlist.pack(fill="x") button = Tix.Button(frame, text="Close", command=frame.quit) button.pack() def showdir(self, directory): print "user selected", directory root = Tix.Tk() app = App(root) root.mainloop() </code> -- Gabriel Genellina
- Previous message (by thread): Inter-process communication, how?
- Next message (by thread): embedding filedialog in a frame in tkinter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list