Web Analytics Made Easy - Statcounter
Skip to content

Popup get folder

Display popup with text entry field and browse button so that a folder can be chosen.

    title = None,
    default_path = "",
    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,
    modal = True,
    history = False,
    history_setting_filename = None

Parameter Descriptions

Name Type Default Description
background_color str None color of background
button_color (str, str) or str None button color (foreground, background)
default_path str path to display to user as starting point (filled into the input field)
font (str or (str, int[, str]) or None) None specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike
grab_anywhere bool False If True: can grab anywhere to move the window (Default = False)
history bool False If True then enable a "history" feature that will display previous entries used. Uses settings filename provided or default if none provided
history_setting_filename str None Filename to use for the User Settings. Will store list of previous entries in this settings file
icon bytes or str None filename or base64 string to be used for the window's icon
image str or bytes None Image to include at the top of the popup window
initial_folder str None location in filesystem to begin browsing
keep_on_top bool None If True the window will remain above all current windows
location (int, int) (None, None) Location of upper left corner of the window
message str message displayed to user
modal bool True 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
no_titlebar bool False If True no titlebar will be shown
no_window bool False if True, no PySimpleGUI window will be shown. Instead just the tkinter dialog is shown
relative_location (int, int) (None, None) (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.
size (int, int) (None, None) (width, height) of the InputText Element
text_color str None color of the text
title str None Window title
RETURN str or None string representing the path chosen, None if cancelled or window closed with X