From 32a99344c9e2c9ad2388e274b0015afd1e97ee5c Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Fri, 26 Oct 2018 14:21:17 -0400 Subject: [PATCH] Test code for filetypes problem --- PySimpleGUI.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 54d40d02..834a3d47 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -1269,7 +1269,7 @@ class Button(Element): should_submit_window = True except: pass - filetypes = [] if self.FileTypes is None else self.FileTypes + filetypes = (("ALL Files", "*.*"),) if self.FileTypes is None else self.FileTypes if self.BType == BUTTON_TYPE_BROWSE_FOLDER: folder_name = tk.filedialog.askdirectory(initialdir=self.InitialFolder) # show the 'get folder' dialog box if folder_name != '': @@ -1279,6 +1279,7 @@ class Button(Element): except: pass elif self.BType == BUTTON_TYPE_BROWSE_FILE: + print('Browse button detected... filetypes is', filetypes) file_name = tk.filedialog.askopenfilename(filetypes=filetypes, initialdir=self.InitialFolder) # show the 'get file' dialog box if file_name != '':