From 8f74aa5c8dcd151a7c859724484b73e2f09cbe31 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Fri, 24 Feb 2023 08:58:41 -0500 Subject: [PATCH] Picking up the latest Multiline & Output element feature that's on GitHub - new parameter autoscroll_only_at_bottom --- docs/call reference.md | 54 +++++++++++++------------ readme_creator/output/call reference.md | 54 +++++++++++++------------ 2 files changed, 58 insertions(+), 50 deletions(-) diff --git a/docs/call reference.md b/docs/call reference.md index 935ad72a..98c2f2a2 100644 --- a/docs/call reference.md +++ b/docs/call reference.md @@ -6248,6 +6248,7 @@ Multiline(default_text = "", enter_submits = False, disabled = False, autoscroll = False, + autoscroll_only_at_bottom = False, border_width = None, size = (None, None), s = (None, None), @@ -6299,6 +6300,7 @@ Parameter Descriptions: | bool | enter_submits | if True, the Window.read call will return is enter key is pressed in this element | | bool | disabled | set disable state | | bool | autoscroll | If True the contents of the element will automatically scroll as more data added to the end | +| bool | 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 | | int | border_width | width of border around element in pixels | | (int, int) or (None, None) or int | 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 | | (int, int) or (None, None) or int | 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 | @@ -7235,6 +7237,7 @@ Output(size = (None, None), text_color = None, pad = None, p = None, + autoscroll_only_at_bottom = False, echo_stdout_stderr = False, font = None, tooltip = None, @@ -7260,31 +7263,32 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| (int, int) or (None, None) or int | 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 | -| (int, int) or (None, None) or int | 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 | -| str | background_color | color of background | -| str | text_color | color of the text | -| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | -| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | -| bool | echo_stdout_stderr | If True then output to stdout will be output to this element AND also to the normal console location | -| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | -| str | tooltip | text, that will appear when mouse hovers over the element | -| str or int or tuple or object | key | Used with window.find_element and with return values to uniquely identify this element to uniquely identify this element | -| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| bool | expand_x | If True the element will automatically expand in the X direction to fill available space | -| bool | expand_y | If True the element will automatically expand in the Y direction to fill available space | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | -| bool | wrap_lines | If True, the lines will be wrapped automatically. Other parms affect this setting, but this one will override them all. Default is it does nothing and uses previous settings for wrapping. | -| bool | horizontal_scroll | Controls if a horizontal scrollbar should be shown. If True, then line wrapping will be off by default | -| str | sbar_trough_color | Scrollbar color of the trough | -| str | sbar_background_color | Scrollbar color of the background of the arrow buttons at the ends AND the color of the "thumb" (the thing you grab and slide). Switches to arrow color when mouse is over | -| str | sbar_arrow_color | Scrollbar color of the arrow at the ends of the scrollbar (it looks like a button). Switches to background color when mouse is over | -| int | sbar_width | Scrollbar width in pixels | -| int | sbar_arrow_width | Scrollbar width of the arrow on the scrollbar. It will potentially impact the overall width of the scrollbar | -| str | sbar_frame_color | Scrollbar Color of frame around scrollbar (available only on some ttk themes) | -| str | sbar_relief | Scrollbar relief that will be used for the "thumb" of the scrollbar (the thing you grab that slides). Should be a constant that is defined at starting with "RELIEF_" - RELIEF_RAISED, RELIEF_SUNKEN, RELIEF_FLAT, RELIEF_RIDGE, RELIEF_GROOVE, RELIEF_SOLID | +| (int, int) or (None, None) or int | 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 | +| (int, int) or (None, None) or int | 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 | +| str | background_color | color of background | +| str | text_color | color of the text | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | +| bool | 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 | +| bool | echo_stdout_stderr | If True then output to stdout will be output to this element AND also to the normal console location | +| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | +| str | tooltip | text, that will appear when mouse hovers over the element | +| str or int or tuple or object | key | Used with window.find_element and with return values to uniquely identify this element to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| bool | expand_x | If True the element will automatically expand in the X direction to fill available space | +| bool | expand_y | If True the element will automatically expand in the Y direction to fill available space | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | +| bool | wrap_lines | If True, the lines will be wrapped automatically. Other parms affect this setting, but this one will override them all. Default is it does nothing and uses previous settings for wrapping. | +| bool | horizontal_scroll | Controls if a horizontal scrollbar should be shown. If True, then line wrapping will be off by default | +| str | sbar_trough_color | Scrollbar color of the trough | +| str | sbar_background_color | Scrollbar color of the background of the arrow buttons at the ends AND the color of the "thumb" (the thing you grab and slide). Switches to arrow color when mouse is over | +| str | sbar_arrow_color | Scrollbar color of the arrow at the ends of the scrollbar (it looks like a button). Switches to background color when mouse is over | +| int | sbar_width | Scrollbar width in pixels | +| int | sbar_arrow_width | Scrollbar width of the arrow on the scrollbar. It will potentially impact the overall width of the scrollbar | +| str | sbar_frame_color | Scrollbar Color of frame around scrollbar (available only on some ttk themes) | +| str | sbar_relief | Scrollbar relief that will be used for the "thumb" of the scrollbar (the thing you grab that slides). Should be a constant that is defined at starting with "RELIEF_" - RELIEF_RAISED, RELIEF_SUNKEN, RELIEF_FLAT, RELIEF_RIDGE, RELIEF_GROOVE, RELIEF_SOLID | ### bind diff --git a/readme_creator/output/call reference.md b/readme_creator/output/call reference.md index 935ad72a..98c2f2a2 100644 --- a/readme_creator/output/call reference.md +++ b/readme_creator/output/call reference.md @@ -6248,6 +6248,7 @@ Multiline(default_text = "", enter_submits = False, disabled = False, autoscroll = False, + autoscroll_only_at_bottom = False, border_width = None, size = (None, None), s = (None, None), @@ -6299,6 +6300,7 @@ Parameter Descriptions: | bool | enter_submits | if True, the Window.read call will return is enter key is pressed in this element | | bool | disabled | set disable state | | bool | autoscroll | If True the contents of the element will automatically scroll as more data added to the end | +| bool | 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 | | int | border_width | width of border around element in pixels | | (int, int) or (None, None) or int | 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 | | (int, int) or (None, None) or int | 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 | @@ -7235,6 +7237,7 @@ Output(size = (None, None), text_color = None, pad = None, p = None, + autoscroll_only_at_bottom = False, echo_stdout_stderr = False, font = None, tooltip = None, @@ -7260,31 +7263,32 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| (int, int) or (None, None) or int | 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 | -| (int, int) or (None, None) or int | 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 | -| str | background_color | color of background | -| str | text_color | color of the text | -| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | -| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | -| bool | echo_stdout_stderr | If True then output to stdout will be output to this element AND also to the normal console location | -| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | -| str | tooltip | text, that will appear when mouse hovers over the element | -| str or int or tuple or object | key | Used with window.find_element and with return values to uniquely identify this element to uniquely identify this element | -| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| bool | expand_x | If True the element will automatically expand in the X direction to fill available space | -| bool | expand_y | If True the element will automatically expand in the Y direction to fill available space | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | -| bool | wrap_lines | If True, the lines will be wrapped automatically. Other parms affect this setting, but this one will override them all. Default is it does nothing and uses previous settings for wrapping. | -| bool | horizontal_scroll | Controls if a horizontal scrollbar should be shown. If True, then line wrapping will be off by default | -| str | sbar_trough_color | Scrollbar color of the trough | -| str | sbar_background_color | Scrollbar color of the background of the arrow buttons at the ends AND the color of the "thumb" (the thing you grab and slide). Switches to arrow color when mouse is over | -| str | sbar_arrow_color | Scrollbar color of the arrow at the ends of the scrollbar (it looks like a button). Switches to background color when mouse is over | -| int | sbar_width | Scrollbar width in pixels | -| int | sbar_arrow_width | Scrollbar width of the arrow on the scrollbar. It will potentially impact the overall width of the scrollbar | -| str | sbar_frame_color | Scrollbar Color of frame around scrollbar (available only on some ttk themes) | -| str | sbar_relief | Scrollbar relief that will be used for the "thumb" of the scrollbar (the thing you grab that slides). Should be a constant that is defined at starting with "RELIEF_" - RELIEF_RAISED, RELIEF_SUNKEN, RELIEF_FLAT, RELIEF_RIDGE, RELIEF_GROOVE, RELIEF_SOLID | +| (int, int) or (None, None) or int | 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 | +| (int, int) or (None, None) or int | 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 | +| str | background_color | color of background | +| str | text_color | color of the text | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | +| bool | 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 | +| bool | echo_stdout_stderr | If True then output to stdout will be output to this element AND also to the normal console location | +| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | +| str | tooltip | text, that will appear when mouse hovers over the element | +| str or int or tuple or object | key | Used with window.find_element and with return values to uniquely identify this element to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| bool | expand_x | If True the element will automatically expand in the X direction to fill available space | +| bool | expand_y | If True the element will automatically expand in the Y direction to fill available space | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | +| bool | wrap_lines | If True, the lines will be wrapped automatically. Other parms affect this setting, but this one will override them all. Default is it does nothing and uses previous settings for wrapping. | +| bool | horizontal_scroll | Controls if a horizontal scrollbar should be shown. If True, then line wrapping will be off by default | +| str | sbar_trough_color | Scrollbar color of the trough | +| str | sbar_background_color | Scrollbar color of the background of the arrow buttons at the ends AND the color of the "thumb" (the thing you grab and slide). Switches to arrow color when mouse is over | +| str | sbar_arrow_color | Scrollbar color of the arrow at the ends of the scrollbar (it looks like a button). Switches to background color when mouse is over | +| int | sbar_width | Scrollbar width in pixels | +| int | sbar_arrow_width | Scrollbar width of the arrow on the scrollbar. It will potentially impact the overall width of the scrollbar | +| str | sbar_frame_color | Scrollbar Color of frame around scrollbar (available only on some ttk themes) | +| str | sbar_relief | Scrollbar relief that will be used for the "thumb" of the scrollbar (the thing you grab that slides). Should be a constant that is defined at starting with "RELIEF_" - RELIEF_RAISED, RELIEF_SUNKEN, RELIEF_FLAT, RELIEF_RIDGE, RELIEF_GROOVE, RELIEF_SOLID | ### bind