You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
popup_get_file - HISTORY feature added! Replaced prints in packer function because can cause errors if strout has been rerouted, Combo no longer resizes on update if no size if given, combo added to the default focus list of elements
Copy file name to clipboardExpand all lines: PySimpleGUI.py
+74-17Lines changed: 74 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
#!/usr/bin/python3
2
2
3
-
version = __version__ = "4.43.0.11 Unreleased\nChanged get_versions string to be more clear, removed canvas from return values, cwd is automatically set to the folder of the application being launched when execute_py_file is called with cwd=None, popup_get_file changed to set parent=None if running on Mac, better Button error handling when bad Unicode chars are used or bad colors, open GitHub issue GUI - added collapse button to top section, see-through mode in test harness changed to be a toggle, font parm for multiline update print cprint for char by char font control, clipboard_set & clipboard_get, Listbox visibility fix, Tree element expansion fixed, added new element_frame convention for elements that are in frames like the Listbox and Tree (need to check the other elements and add those that have frames), fix in debug print for font not being passed along, removed print"
3
+
version = __version__ = "4.43.0.12 Unreleased\nChanged get_versions string to be more clear, removed canvas from return values, cwd is automatically set to the folder of the application being launched when execute_py_file is called with cwd=None, popup_get_file changed to set parent=None if running on Mac, better Button error handling when bad Unicode chars are used or bad colors, open GitHub issue GUI - added collapse button to top section, see-through mode in test harness changed to be a toggle, font parm for multiline update print cprint for char by char font control, clipboard_set & clipboard_get, Listbox visibility fix, Tree element expansion fixed, added new element_frame convention for elements that are in frames like the Listbox and Tree (need to check the other elements and add those that have frames), fix in debug print for font not being passed along, removed print, Combo size is not changed when updating unless user specifies a size, converted prints in the packer function into error popups, added Combo to the list of element capable of initially getting focus when default focus is used, popup_get_file gets history feature (NICE!)"
4
4
5
5
__version__ = version.split()[0] # For PEP 396 and PEP 345
Display popup window with text entry field and browse button so that a file can be chosen by user.
17071
17088
@@ -17085,7 +17102,7 @@ def popup_get_file(message, title=None, default_path='', default_extension='', s
17085
17102
:type file_types: Tuple[Tuple[str,str]]
17086
17103
:param no_window: if True, no PySimpleGUI window will be shown. Instead just the tkinter dialog is shown
17087
17104
:type no_window: (bool)
17088
-
:param size: (width, height) of the InputText Element
17105
+
:param size: (width, height) of the InputText Element or Combo element if using history feature
17089
17106
:type size: (int, int)
17090
17107
:param button_color: Color of the button (text, background)
17091
17108
:type button_color: (str, str) or str
@@ -17113,10 +17130,28 @@ def popup_get_file(message, title=None, default_path='', default_extension='', s
17113
17130
:type files_delimiter: str
17114
17131
:param modal: If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True
17115
17132
:type modal: bool
17133
+
:param history: If True then enable a "history" feature that will display previous entries used. Uses settings filename provided or default if none provided
17134
+
:type history: bool
17135
+
:param history_setting_filename: Filename to use for the User Settings. Will store list of previous entries in this settings file
17136
+
:type history_setting_filename: (str)
17116
17137
:return: string representing the file(s) chosen, None if cancelled or window closed with X
17117
17138
:rtype: str | None
17118
17139
"""
17119
17140
17141
+
17142
+
# First setup the history settings file if history feature is enabled
17143
+
if history and history_setting_filename is not None:
0 commit comments