MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / Multiline

Class Multiline

PySimpleGUI/PySimpleGUI.py:3627–4097  ·  view source on GitHub ↗

Multiline Element - Display and/or read multiple lines of text. This is both an input and output element. Other PySimpleGUI ports have a separate MultilineInput and MultilineOutput elements. May want to split this one up in the future too.

Source from the content-addressed store, hash-verified

3625# Multiline #
3626# ---------------------------------------------------------------------- #
3627class Multiline(Element):
3628 """
3629 Multiline Element - Display and/or read multiple lines of text. This is both an input and output element.
3630 Other PySimpleGUI ports have a separate MultilineInput and MultilineOutput elements. May want to split this
3631 one up in the future too.
3632 """
3633
3634 def __init__(self, default_text='', enter_submits=False, disabled=False, autoscroll=False, autoscroll_only_at_bottom=False, border_width=None,
3635 size=(None, None), s=(None, None), setting=None, auto_size_text=None, background_color=None, text_color=None, selected_text_color=None, selected_background_color=None, horizontal_scroll=False, change_submits=False, enable_events=False, do_not_clear=True, key=None, k=None, write_only=False, auto_refresh=False, reroute_stdout=False, reroute_stderr=False, reroute_cprint=False, echo_stdout_stderr=False, focus=False, font=None, pad=None, p=None, tooltip=None, justification=None, no_scrollbar=False, wrap_lines=None, sbar_trough_color=None, sbar_background_color=None, sbar_arrow_color=None, sbar_width=None, sbar_arrow_width=None, sbar_frame_color=None, sbar_relief=None, expand_x=False, expand_y=False, rstrip=True, right_click_menu=None, visible=True, metadata=None):
3636 """
3637 :param default_text: Initial text to show
3638 :type default_text: (Any)
3639 :param enter_submits: if True, the Window.read call will return is enter key is pressed in this element
3640 :type enter_submits: (bool)
3641 :param disabled: set disable state
3642 :type disabled: (bool)
3643 :param autoscroll: If True the contents of the element will automatically scroll as more data added to the end
3644 :type autoscroll: (bool)
3645 :param autoscroll_only_at_bottom: If True the contents of the element will automatically scroll only if the scrollbar is at the bottom of the multiline
3646 :type autoscroll_only_at_bottom: (bool)
3647 :param border_width: width of border around element in pixels
3648 :type border_width: (int)
3649 :param size: (w, h) w=characters-wide, h=rows-high. If an int instead of a tuple is supplied, then height is auto-set to 1
3650 :type size: (int, int) | (None, None) | int | (None, int)
3651 :param s: Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used
3652 :type s: (int, int) | (None, None) | int | (None, int)
3653 :param setting: If not None, then this element will be saved in a settings file using the key for the element
3654 :type setting: (Any)
3655 :param auto_size_text: if True will size the element to match the length of the text
3656 :type auto_size_text: (bool)
3657 :param background_color: color of background
3658 :type background_color: (str)
3659 :param text_color: color of the text
3660 :type text_color: (str)
3661 :param selected_text_color: Color of text when it is selected (using mouse or control+A, etc)
3662 :type selected_text_color: (str)
3663 :param selected_background_color: Color of background when it is selected (using mouse or control+A, etc)
3664 :type selected_background_color: (str)
3665 :param horizontal_scroll: Controls if a horizontal scrollbar should be shown. If True a horizontal scrollbar will be shown in addition to vertical
3666 :type horizontal_scroll: (bool)
3667 :param change_submits: DO NOT USE. Only listed for backwards compat - Use enable_events instead
3668 :type change_submits: (bool)
3669 :param enable_events: If True then any key press that happens when the element has focus will generate an event.
3670 :type enable_events: (bool)
3671 :param do_not_clear: if False the element will be cleared any time the Window.read call returns
3672 :type do_not_clear: (bool)
3673 :param key: Used with window.find_element and with return values to uniquely identify this element to uniquely identify this element
3674 :type key: str | int | tuple | object
3675 :param k: Same as the Key. You can use either k or key. Which ever is set will be used.
3676 :type k: str | int | tuple | object
3677 :param write_only: If True then no entry will be added to the values dictionary when the window is read
3678 :type write_only: bool
3679 :param auto_refresh: If True then anytime the element is updated, the window will be refreshed so that the change is immediately displayed
3680 :type auto_refresh: (bool)
3681 :param reroute_stdout: If True then all output to stdout will be output to this element
3682 :type reroute_stdout: (bool)
3683 :param reroute_stderr: If True then all output to stderr will be output to this element
3684 :type reroute_stderr: (bool)

Callers 8

__init__Method · 0.85
popup_scrolledFunction · 0.85
popup_get_textFunction · 0.85
main_sdk_helpFunction · 0.85
_create_main_windowFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected