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.

popup_get_folder(
    message,
    default_path = "",
    no_window = False,
    size = (None, None),
    button_color = None,
    background_color = None,
    text_color = None,
    icon = "default_icon.ico",
    font = None,
    no_titlebar = False,
    grab_anywhere = False,
    keep_on_top = False,
    location = (None, None),
    initial_folder = 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)
icon bytes or str default_icon.ico filename or base64 string to be used for the window's icon
initial_folder str None location in filesystem to begin browsing
keep_on_top bool False 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
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
size (int, int) (None, None) (width, height) of the InputText Element
text_color str None color of the text
RETURN str or None string representing the path chosen, None if cancelled or window closed with X