Display popup window with text entry field and browse button so that a file can be chosen by user. :param message: message displayed to user :type message: (str) :param title: Window title :type title: (s
(message, title=None, default_path='', default_extension='', save_as=False, multiple_files=False,
file_types=FILE_TYPES_ALL_FILES,
no_window=False, size=(None, None), button_color=None, background_color=None, text_color=None,
icon=None, font=None, no_titlebar=False, grab_anywhere=False, keep_on_top=None,
location=(None, None), relative_location=(None, None), initial_folder=None, image=None, files_delimiter=BROWSE_FILES_DELIMITER, modal=True, history=False, show_hidden=True,
history_setting_filename=None)
| 21372 | # --------------------------- popup_get_file --------------------------- |
| 21373 | |
| 21374 | def popup_get_file(message, title=None, default_path='', default_extension='', save_as=False, multiple_files=False, |
| 21375 | file_types=FILE_TYPES_ALL_FILES, |
| 21376 | no_window=False, size=(None, None), button_color=None, background_color=None, text_color=None, |
| 21377 | icon=None, font=None, no_titlebar=False, grab_anywhere=False, keep_on_top=None, |
| 21378 | location=(None, None), relative_location=(None, None), initial_folder=None, image=None, files_delimiter=BROWSE_FILES_DELIMITER, modal=True, history=False, show_hidden=True, |
| 21379 | history_setting_filename=None): |
| 21380 | """ |
| 21381 | Display popup window with text entry field and browse button so that a file can be chosen by user. |
| 21382 | |
| 21383 | :param message: message displayed to user |
| 21384 | :type message: (str) |
| 21385 | :param title: Window title |
| 21386 | :type title: (str) |
| 21387 | :param default_path: path to display to user as starting point (filled into the input field) |
| 21388 | :type default_path: (str) |
| 21389 | :param default_extension: If no extension entered by user, add this to filename (only used in saveas dialogs) |
| 21390 | :type default_extension: (str) |
| 21391 | :param save_as: if True, the "save as" dialog is shown which will verify before overwriting |
| 21392 | :type save_as: (bool) |
| 21393 | :param multiple_files: if True, then allows multiple files to be selected that are returned with ';' between each filename |
| 21394 | :type multiple_files: (bool) |
| 21395 | :param file_types: List of extensions to show using wildcards. All files (the default) = (("ALL Files", "*.* *"),). |
| 21396 | :type file_types: Tuple[Tuple[str,str]] |
| 21397 | :param no_window: if True, no PySimpleGUI window will be shown. Instead just the tkinter dialog is shown |
| 21398 | :type no_window: (bool) |
| 21399 | :param size: (width, height) of the InputText Element or Combo element if using history feature |
| 21400 | :type size: (int, int) |
| 21401 | :param button_color: Color of the button (text, background) |
| 21402 | :type button_color: (str, str) | str |
| 21403 | :param background_color: background color of the entire window |
| 21404 | :type background_color: (str) |
| 21405 | :param text_color: color of the text |
| 21406 | :type text_color: (str) |
| 21407 | :param icon: filename or base64 string to be used for the window's icon |
| 21408 | :type icon: bytes | str |
| 21409 | :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| 21410 | :type font: (str or (str, int[, str]) or None) |
| 21411 | :param no_titlebar: If True no titlebar will be shown |
| 21412 | :type no_titlebar: (bool) |
| 21413 | :param grab_anywhere: If True: can grab anywhere to move the window (Default = False) |
| 21414 | :type grab_anywhere: (bool) |
| 21415 | :param keep_on_top: If True the window will remain above all current windows |
| 21416 | :type keep_on_top: (bool) |
| 21417 | :param location: Location of upper left corner of the window |
| 21418 | :type location: (int, int) |
| 21419 | :param relative_location: (x,y) location relative to the default location of the window, in pixels. Normally the window centers. This location is relative to the location the window would be created. Note they can be negative. |
| 21420 | :type relative_location: (int, int) |
| 21421 | :param initial_folder: location in filesystem to begin browsing |
| 21422 | :type initial_folder: (str) |
| 21423 | :param image: Image to include at the top of the popup window |
| 21424 | :type image: (str) or (bytes) |
| 21425 | :param files_delimiter: String to place between files when multiple files are selected. Normally a ; |
| 21426 | :type files_delimiter: str |
| 21427 | :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 |
| 21428 | :type modal: bool |
| 21429 | :param history: If True then enable a "history" feature that will display previous entries used. Uses settings filename provided or default if none provided |
| 21430 | :type history: bool |
| 21431 | :param show_hidden: If True then enables the checkbox in the system dialog to select hidden files to be shown |
no test coverage detected