Web Analytics Made Easy - Statcounter
Skip to content

Popup get text

Display Popup with text entry field. Returns the text entered or None if closed / cancelled

    title = None,
    default_text = "",
    password_char = "",
    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),
    image = None,
    history = False,
    history_setting_filename = None,
    modal = True

Parameter Descriptions

Name Type Default Description
background_color str None background color of the entire window
button_color (str, str) or str None Color of the button (text, background)
default_text str default value to put into input area
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 click and drag anywhere in the window to move the window
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
keep_on_top bool None If True the window will remain above all current windows
location (int, int) (None, None) (x,y) Location on screen to display the upper left corner of 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
password_char str character to be shown instead of actually typed characters. WARNING - if history=True then can't hide passwords
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 input. If not specied a single line Input element used. If height >1 a Mulitline is shown
text_color str None color of the message text
title str None Window title
RETURN str or None Text entered or None if window was closed or cancel button clicked