Hi Austin, On Mon, 11 Sep 2017 10:44:07 -0500 Austin Redding <austinmredd...@gmail.com> wrote:
> I'm attempting to use 'askdirectory' in order to populate a widget with > the relevant files in the user selected directory. However, when using > 'askdirectory' the user isn't able to see the files inside the > directory, unlike 'askopenfilename' which displays all the files. > > Is there any fix to allow for the contents of a directory to be > displayed (like 'askopenfilename'), but maintain the functionality of > 'askdirectory'? I want to use 'askdirectory' because I don't want the > user to have to create a new file dialog window every time they want to > switch between files located in the same directory. > > I've dug through the source code, but I can't seem to pinpoint where the > decision to display/show files is made depending on the choice of > 'askopenfilename', 'askdirectory', etc. Any help or direction would be > greatly appreciated. I don't think this can be done with the plain Tk file dialog. Maybe you could use the tix.ExFileSelectBox or the tix.DirTree instead, or set up something yourself, like checking the contents of the directory returned by askdirectory() and insert the file names into a listbox. Best regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. Compassion -- that's the one things no machine ever had. Maybe it's the one thing that keeps men ahead of them. -- McCoy, "The Ultimate Computer", stardate 4731.3 _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org https://mail.python.org/mailman/listinfo/tkinter-discuss