diff --git a/docs/call reference.md b/docs/call reference.md index 25960201..55300187 100644 --- a/docs/call reference.md +++ b/docs/call reference.md @@ -1,7 +1,14 @@ +![pysimplegui_logo](https://user-images.githubusercontent.com/13696193/43165867-fe02e3b2-8f62-11e8-9fd0-cc7c86b11772.png) # ELEMENT AND FUNCTION CALL REFERENCE -NOTE that this documentation section is created using the ***GitHUB released PySimpleGUI.py file***. This means you're seeing the tkinter port only and some of the changes might not yet be released on PyPI. Some of the calls may not be available to you or your port (Qt, Wx, Web). And some of the parameters may be different. We're working on adding docstrings to all the ports which will enable this kind of document to be available for each port. +Here you will find the details for all Elements, Objects, and Functions that are available to you. If you want to use a complex element and don't understand the parameters, then this is the right place to come. For every element you're shown the parameters used to create it as well as all methods available to call. + +## Currently PySimpleGUI (tkinter) only + +This documentation is created using the PySimpleGUI.py file which means it's based on the tkinter code. Some of the calls are different, might not exist at all, or there may be more methods/functions for the other PySimpleGUI ports (Qt, Wx, Web). + +Work is underway to get the PySimpleGUIQt docstrings completed and corrected. ## Caution - Some functions / methods may be internal only yet exposed in this documentation @@ -12,9 +19,6 @@ Here are all of the Elements, the Window & SystemTray classes, and all functions ## Button Element Button Element - Defines all possible buttons. The shortcuts such as Submit, FileBrowse, ... each create a Button - - - ``` Button(button_text="", @@ -45,7 +49,6 @@ Button(button_text="", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -77,11 +80,8 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### Click - - Generates a click of the button as if the user clicked the button Calls the tkinter invoke method for the button @@ -89,66 +89,46 @@ Generates a click of the button as if the user clicked the button Click() ``` - - - - - ### GetText - - - Returns the current text shown on a button `GetText()` - - |Type|Name|Meaning| |---|---|---| || **return** | The text currently displayed on the button | - - - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Button Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -163,7 +143,6 @@ Update(text=None, image_size=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -178,10 +157,8 @@ Parameter Descriptions: | int | image_subsample | amount to reduce the size of the image. Divides the size by this number. 2=1/2, 3=1/3, 4=1/4, etc | | Tuple[int, int] | image_size | Size of the image in pixels (width, height) | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -189,13 +166,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### click - - Generates a click of the button as if the user clicked the button Calls the tkinter invoke method for the button @@ -203,14 +175,8 @@ Generates a click of the button as if the user clicked the button click() ``` - - - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -219,49 +185,28 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### get_text - - - Returns the current text shown on a button `get_text()` - - |Type|Name|Meaning| |---|---|---| || **return** | The text currently displayed on the button | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -269,43 +214,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -313,47 +245,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -361,14 +282,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Button Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -383,7 +298,6 @@ update(text=None, image_size=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -398,13 +312,9 @@ Parameter Descriptions: | int | image_subsample | amount to reduce the size of the image. Divides the size by this number. 2=1/2, 3=1/3, 4=1/4, etc | | Tuple[int, int] | image_size | Size of the image in pixels (width, height) | - ## ButtonMenu Element The Button Menu Element. Creates a button that when clicked will show a menu similar to right click menu - - - ``` ButtonMenu(button_text, @@ -427,7 +337,6 @@ ButtonMenu(button_text, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -451,11 +360,8 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### Click - - Generates a click of the button as if the user clicked the button Calls the tkinter invoke method for the button @@ -463,55 +369,42 @@ Generates a click of the button as if the user clicked the button Click() ``` - - - - - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the ButtonMenu Element. Must call `Window.Read` or `Window.Finalize` prior ``` Update(menu_definition, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -519,10 +412,8 @@ Parameter Descriptions: | List[List] | menu_definition | (New menu definition (in menu definition format) | | bool | visible | control visibility of element | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -530,12 +421,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -544,31 +431,18 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -576,43 +450,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -620,47 +481,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -668,21 +518,14 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the ButtonMenu Element. Must call `Window.Read` or `Window.Finalize` prior ``` update(menu_definition, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -690,12 +533,8 @@ Parameter Descriptions: | List[List] | menu_definition | (New menu definition (in menu definition format) | | bool | visible | control visibility of element | - ## Canvas Element - - - ``` Canvas(canvas=None, background_color=None, @@ -708,7 +547,6 @@ Canvas(canvas=None, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -723,61 +561,46 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### TKCanvas - - #### property: TKCanvas Returns the underlying tkiner Canvas widget - - |Type|Name|Meaning| |---|---|---| || **return** | The tkinter canvas widget | - - - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -785,12 +608,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -799,31 +618,18 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -831,43 +637,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -875,64 +668,46 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### tk_canvas - - #### property: tk_canvas Returns the underlying tkiner Canvas widget - - |Type|Name|Meaning| |---|---|---| || **return** | The tkinter canvas widget | - - - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -940,17 +715,9 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ## Checkbox Element Checkbox Element - Displays a checkbox and text next to it - - - ``` Checkbox(text, @@ -970,7 +737,6 @@ Checkbox(text, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -991,62 +757,46 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### Get - - - Return the current state of this checkbox `Get()` - - |Type|Name|Meaning| |---|---|---| || **return** | Current state of checkbox | - - - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Checkbox Element. Must call `Window.Read` or `Window.Finalize` prior. Note that changing visibility may cause element to change locations when made visible after invisible @@ -1059,7 +809,6 @@ Update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -1071,10 +820,8 @@ Parameter Descriptions: | bool | disabled | disable or enable element | | bool | visible | control visibility of element | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -1082,12 +829,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -1096,49 +839,28 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get - - - Return the current state of this checkbox `get()` - - |Type|Name|Meaning| |---|---|---| || **return** | Current state of checkbox | - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -1146,43 +868,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -1190,47 +899,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -1238,14 +936,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Checkbox Element. Must call `Window.Read` or `Window.Finalize` prior. Note that changing visibility may cause element to change locations when made visible after invisible @@ -1258,7 +950,6 @@ update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -1270,13 +961,9 @@ Parameter Descriptions: | bool | disabled | disable or enable element | | bool | visible | control visibility of element | - ## Column Element A container element that is used to create a layout within your window's layout - - - ``` Column(layout, @@ -1293,7 +980,6 @@ Column(layout, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -1311,34 +997,28 @@ Parameter Descriptions: | str | element_justification | All elements inside the Column will have this justification 'left', 'right', 'center' are valid values | | Any | metadata | User metadata that can be set to ANYTHING | - ### AddRow - Not recommended user call. Used to add rows of Elements to the Column Element. ``` AddRow(args=*<1 or N object>) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | List[Element] | *args | The list of elements for this row | - ### Layout - Can use like the Window.Layout method, but it's better to use the layout parameter when creating ``` Layout(rows) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -1346,78 +1026,64 @@ Parameter Descriptions: | List[List[Element]] | rows | The rows of Elements | | (Column) | **RETURN** | Used for chaining - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Column Element. Must call `Window.Read` or `Window.Finalize` prior ``` Update(visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | visible | control visibility of element | - ### add_row - Not recommended user call. Used to add rows of Elements to the Column Element. ``` add_row(args=*<1 or N object>) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | List[Element] | *args | The list of elements for this row | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -1425,12 +1091,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -1439,31 +1101,18 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -1471,21 +1120,14 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### layout - Can use like the Window.Layout method, but it's better to use the layout parameter when creating ``` layout(rows) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -1493,39 +1135,30 @@ Parameter Descriptions: | List[List[Element]] | rows | The rows of Elements | | (Column) | **RETURN** | Used for chaining - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -1533,47 +1166,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -1581,34 +1203,23 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Column Element. Must call `Window.Read` or `Window.Finalize` prior ``` update(visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | visible | control visibility of element | - ## Combo Element ComboBox Element - A combination of a single-line input and a drop-down menu. User can type in their own value or choose from list. - - - ``` Combo(values, @@ -1629,7 +1240,6 @@ Combo(values, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -1647,63 +1257,47 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### Get - - - Returns the current (right now) value of the Combo. DO NOT USE THIS AS THE NORMAL WAY OF READING A COMBO! You should be using values from your call to window.Read instead. Know what you're doing if you use it. `Get()` - - |Type|Name|Meaning| |---|---|---| || **return** | Returns the value of what is currently chosen | - - - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Combo Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -1716,7 +1310,6 @@ Update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -1729,10 +1322,8 @@ Parameter Descriptions: | Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | | bool | visible | control visibility of element | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -1740,12 +1331,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -1754,50 +1341,29 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get - - - Returns the current (right now) value of the Combo. DO NOT USE THIS AS THE NORMAL WAY OF READING A COMBO! You should be using values from your call to window.Read instead. Know what you're doing if you use it. `get()` - - |Type|Name|Meaning| |---|---|---| || **return** | Returns the value of what is currently chosen | - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -1805,43 +1371,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -1849,47 +1402,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -1897,14 +1439,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Combo Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -1917,7 +1453,6 @@ update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -1930,14 +1465,9 @@ Parameter Descriptions: | Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | | bool | visible | control visibility of element | - - ## Frame Element A Frame Element that contains other Elements. Encloses with a line around elements and a text label. - - - ``` Frame(title, @@ -1958,7 +1488,6 @@ Frame(title, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -1980,34 +1509,28 @@ Parameter Descriptions: | str | element_justification | All elements inside the Frame will have this justification 'left', 'right', 'center' are valid values | | Any | metadata | User metadata that can be set to ANYTHING | - ### AddRow - Not recommended user call. Used to add rows of Elements to the Frame Element. ``` AddRow(args=*<1 or N object>) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | List[Element] | *args | The list of elements for this row | - ### Layout - Can use like the Window.Layout method, but it's better to use the layout parameter when creating ``` Layout(rows) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2015,51 +1538,42 @@ Parameter Descriptions: | List[List[Element]] | rows | The rows of Elements | | (Frame) | **RETURN** | Used for chaining - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Frame Element. Must call `Window.Read` or `Window.Finalize` prior ``` Update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2067,27 +1581,22 @@ Parameter Descriptions: | Any | value | New text value to show on frame | | bool | visible | control visibility of element | - ### add_row - Not recommended user call. Used to add rows of Elements to the Frame Element. ``` add_row(args=*<1 or N object>) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | List[Element] | *args | The list of elements for this row | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -2095,12 +1604,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -2109,31 +1614,18 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -2141,21 +1633,14 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### layout - Can use like the Window.Layout method, but it's better to use the layout parameter when creating ``` layout(rows) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2163,39 +1648,30 @@ Parameter Descriptions: | List[List[Element]] | rows | The rows of Elements | | (Frame) | **RETURN** | Used for chaining - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -2203,47 +1679,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -2251,21 +1716,14 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Frame Element. Must call `Window.Read` or `Window.Finalize` prior ``` update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2273,7 +1731,6 @@ Parameter Descriptions: | Any | value | New text value to show on frame | | bool | visible | control visibility of element | - ## Graph Element Creates an area for you to draw on. The MAGICAL property this Element has is that you interact @@ -2285,9 +1742,6 @@ Parameter Descriptions: You can also use float values. To do so, be sure and set the float_values parameter. Mouse click and drag events are possible and return the (x,y) coordinates of the mouse Drawing primitives return an "id" that is referenced when you want to operation on that item (e.g. to erase it) - - - ``` Graph(canvas_size, @@ -2306,7 +1760,6 @@ Graph(canvas_size, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2326,44 +1779,36 @@ Parameter Descriptions: | bool | float_values | If True x,y coordinates are returned as floats, not ints | | Any | metadata | User metadata that can be set to ANYTHING | - ### BringFigureToFront - Changes Z-order of figures on the Graph. Brings the indicated figure to the front of all other drawn figures ``` BringFigureToFront(figure) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | int | figure | value returned by tkinter when creating the figure / drawing | - ### DeleteFigure - Remove from the Graph the figure represented by id. The id is given to you anytime you call a drawing primitive ``` DeleteFigure(id) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | int | id | the id returned to you when calling one of the drawing methods | - ### DrawArc - Draws different types of arcs. Uses a "bounding box" to define location ``` @@ -2376,7 +1821,6 @@ DrawArc(top_left, line_width=1) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2389,10 +1833,8 @@ Parameter Descriptions: | str | arc_color | color to draw arc with | | Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the arc - ### DrawCircle - Draws a circle, cenetered at the location provided. Can set the fill and outline colors ``` @@ -2403,7 +1845,6 @@ DrawCircle(center_location, line_width=1) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2415,10 +1856,8 @@ Parameter Descriptions: | int | line_width | width of the line around the circle, the outline, in pixels | | Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the circle - ### DrawImage - Places an image onto your canvas. It's a really important method for this element as it enables so much ``` @@ -2430,7 +1869,6 @@ DrawImage(filename=None, angle=0) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2443,10 +1881,8 @@ Parameter Descriptions: | float | angle | Angle 0 to 360 to draw the text. Zero represents horizontal text | | Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the image - ### DrawLine - Draws a line from one point to another point using USER'S coordinates. Can set the color and width of line ``` @@ -2456,7 +1892,6 @@ DrawLine(point_from, width=1) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2467,10 +1902,8 @@ Parameter Descriptions: | int | width | width of line in pixels | | Union[int, None] | **RETURN** | id returned from tktiner or None if user closed the window. id is used when you - ### DrawOval - Draws an oval based on coordinates in user coordinate system. Provide the location of a "bounding rectangle" ``` @@ -2481,7 +1914,6 @@ DrawOval(top_left, line_width=1) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2493,10 +1925,8 @@ Parameter Descriptions: | int | line_width | width of the line around the oval, the outline, in pixels | | Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the oval - ### DrawPoint - Draws a "dot" at the point you specify using the USER'S coordinate system ``` @@ -2505,7 +1935,6 @@ DrawPoint(point, color="black") ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2515,10 +1944,8 @@ Parameter Descriptions: | str | color | color of the point to draw | | Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the point - ### DrawPolygon - Draw a polygon given list of points ``` @@ -2528,7 +1955,6 @@ DrawPolygon(points, line_width=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2539,10 +1965,8 @@ Parameter Descriptions: | int | line_width | width of the line in pixels | | Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the rectangle - ### DrawRectangle - Draw a rectangle given 2 points. Can control the line and fill colors ``` @@ -2553,7 +1977,6 @@ DrawRectangle(top_left, line_width=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2565,10 +1988,8 @@ Parameter Descriptions: | int | line_width | width of the line in pixels | | Union[int, None] | **RETURN** | Union[int, None] id returned from tkinter that you'll need if you want to manipulate the rectangle - ### DrawText - Draw some text on your graph. This is how you label graph number lines for example ``` @@ -2580,7 +2001,6 @@ DrawText(text, text_location="center") ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2593,32 +2013,22 @@ Parameter Descriptions: | enum | text_location | "anchor" location for the text. Values start with TEXT_LOCATION_ | | Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the text - ### Erase - - Erase the Graph - Removes all figures previously "drawn" using the Graph methods (e.g. DrawText) ```python Erase() ``` - - - - - ### GetBoundingBox - Given a figure, returns the upper left and lower right bounding box coordinates ``` GetBoundingBox(figure) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2626,17 +2036,14 @@ Parameter Descriptions: | object | figure | a previously drawing figure | | Union[Tuple[int, int, int, int], Tuple[float, float, float, float]] | **RETURN** | upper left x, upper left y, lower right x, lower right y - ### GetFiguresAtLocation - Returns a list of figures located at a particular x,y location within the Graph ``` GetFiguresAtLocation(location) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2644,17 +2051,14 @@ Parameter Descriptions: | Union[Tuple[int, int], Tuple[float, float]] | location | point to check | | List[int] | **RETURN** | a list of previously drawn "Figures" (returned from the drawing primitives) - ### Move - Moves the entire drawing area (the canvas) by some delta from the current position. Units are indicated in your coordinate system indicated number of ticks in your coordinate system ``` Move(x_direction, y_direction) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2662,10 +2066,8 @@ Parameter Descriptions: | Union[int, float] | x_direction | how far to move in the "X" direction in your coordinates | | Union[int, float] | y_direction | how far to move in the "Y" direction in your coordinates | - ### MoveFigure - Moves a previously drawn figure using a "delta" from current position ``` @@ -2674,7 +2076,6 @@ MoveFigure(figure, y_direction) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2683,10 +2084,8 @@ Parameter Descriptions: | Union[int, float] | x_direction | delta to apply to position in the X direction | | Union[int, float] | y_direction | delta to apply to position in the Y direction | - ### RelocateFigure - Move a previously made figure to an arbitrary (x,y) location. This differs from the Move methods because it uses absolute coordinates versus relative for Move @@ -2696,7 +2095,6 @@ RelocateFigure(figure, y) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2705,85 +2103,66 @@ Parameter Descriptions: | Union[int, float] | x | location on X axis (in user coords) to move the upper left corner of the figure | | Union[int, float] | y | location on Y axis (in user coords) to move the upper left corner of the figure | - ### SendFigureToBack - Changes Z-order of figures on the Graph. Sends the indicated figure to the back of all other drawn figures ``` SendFigureToBack(figure) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | int | figure | value returned by tkinter when creating the figure / drawing | - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### TKCanvas - - #### property: TKCanvas Returns the underlying tkiner Canvas widget - - |Type|Name|Meaning| |---|---|---| || **return** | The tkinter canvas widget | - - - ### Update - Changes some of the settings for the Graph Element. Must call `Window.Read` or `Window.Finalize` prior ``` Update(background_color=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2791,10 +2170,8 @@ Parameter Descriptions: | ??? | background_color | color of background | | bool | visible | control visibility of element | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -2802,29 +2179,22 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### bring_figure_to_front - Changes Z-order of figures on the Graph. Brings the indicated figure to the front of all other drawn figures ``` bring_figure_to_front(figure) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | int | figure | value returned by tkinter when creating the figure / drawing | - ### change_coordinates - Changes the corrdinate system to a new one. The same 2 points in space are used to define the coorinate system - the bottom left and the top right values of your graph. @@ -2832,7 +2202,6 @@ system - the bottom left and the top right values of your graph. change_coordinates(graph_bottom_left, graph_top_right) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2840,27 +2209,22 @@ Parameter Descriptions: | Tuple[int, int] (x,y) | graph_bottom_left | The bottoms left corner of your coordinate system | | Tuple[int, int] (x,y) | graph_top_right | The top right corner of your coordinate system | - ### delete_figure - Remove from the Graph the figure represented by id. The id is given to you anytime you call a drawing primitive ``` delete_figure(id) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | int | id | the id returned to you when calling one of the drawing methods | - ### draw_arc - Draws different types of arcs. Uses a "bounding box" to define location ``` @@ -2873,7 +2237,6 @@ draw_arc(top_left, line_width=1) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2886,10 +2249,8 @@ Parameter Descriptions: | str | arc_color | color to draw arc with | | Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the arc - ### draw_circle - Draws a circle, cenetered at the location provided. Can set the fill and outline colors ``` @@ -2900,7 +2261,6 @@ draw_circle(center_location, line_width=1) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2912,10 +2272,8 @@ Parameter Descriptions: | int | line_width | width of the line around the circle, the outline, in pixels | | Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the circle - ### draw_image - Places an image onto your canvas. It's a really important method for this element as it enables so much ``` @@ -2927,7 +2285,6 @@ draw_image(filename=None, angle=0) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2940,10 +2297,8 @@ Parameter Descriptions: | float | angle | Angle 0 to 360 to draw the text. Zero represents horizontal text | | Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the image - ### draw_line - Draws a line from one point to another point using USER'S coordinates. Can set the color and width of line ``` @@ -2953,7 +2308,6 @@ draw_line(point_from, width=1) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2964,10 +2318,8 @@ Parameter Descriptions: | int | width | width of line in pixels | | Union[int, None] | **RETURN** | id returned from tktiner or None if user closed the window. id is used when you - ### draw_oval - Draws an oval based on coordinates in user coordinate system. Provide the location of a "bounding rectangle" ``` @@ -2978,7 +2330,6 @@ draw_oval(top_left, line_width=1) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -2990,10 +2341,8 @@ Parameter Descriptions: | int | line_width | width of the line around the oval, the outline, in pixels | | Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the oval - ### draw_point - Draws a "dot" at the point you specify using the USER'S coordinate system ``` @@ -3002,7 +2351,6 @@ draw_point(point, color="black") ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3012,10 +2360,8 @@ Parameter Descriptions: | str | color | color of the point to draw | | Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the point - ### draw_polygon - Draw a polygon given list of points ``` @@ -3025,7 +2371,6 @@ draw_polygon(points, line_width=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3036,10 +2381,8 @@ Parameter Descriptions: | int | line_width | width of the line in pixels | | Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the rectangle - ### draw_rectangle - Draw a rectangle given 2 points. Can control the line and fill colors ``` @@ -3050,7 +2393,6 @@ draw_rectangle(top_left, line_width=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3062,10 +2404,8 @@ Parameter Descriptions: | int | line_width | width of the line in pixels | | Union[int, None] | **RETURN** | Union[int, None] id returned from tkinter that you'll need if you want to manipulate the rectangle - ### draw_text - Draw some text on your graph. This is how you label graph number lines for example ``` @@ -3077,7 +2417,6 @@ draw_text(text, text_location="center") ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3090,25 +2429,16 @@ Parameter Descriptions: | enum | text_location | "anchor" location for the text. Values start with TEXT_LOCATION_ | | Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the text - ### erase - - Erase the Graph - Removes all figures previously "drawn" using the Graph methods (e.g. DrawText) ```python erase() ``` - - - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -3117,19 +2447,14 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_bounding_box - Given a figure, returns the upper left and lower right bounding box coordinates ``` get_bounding_box(figure) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3137,17 +2462,14 @@ Parameter Descriptions: | object | figure | a previously drawing figure | | Union[Tuple[int, int, int, int], Tuple[float, float, float, float]] | **RETURN** | upper left x, upper left y, lower right x, lower right y - ### get_figures_at_location - Returns a list of figures located at a particular x,y location within the Graph ``` get_figures_at_location(location) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3155,29 +2477,18 @@ Parameter Descriptions: | Union[Tuple[int, int], Tuple[float, float]] | location | point to check | | List[int] | **RETURN** | a list of previously drawn "Figures" (returned from the drawing primitives) - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -3185,21 +2496,14 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### move - Moves the entire drawing area (the canvas) by some delta from the current position. Units are indicated in your coordinate system indicated number of ticks in your coordinate system ``` move(x_direction, y_direction) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3207,10 +2511,8 @@ Parameter Descriptions: | Union[int, float] | x_direction | how far to move in the "X" direction in your coordinates | | Union[int, float] | y_direction | how far to move in the "Y" direction in your coordinates | - ### move_figure - Moves a previously drawn figure using a "delta" from current position ``` @@ -3219,7 +2521,6 @@ move_figure(figure, y_direction) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3228,10 +2529,8 @@ Parameter Descriptions: | Union[int, float] | x_direction | delta to apply to position in the X direction | | Union[int, float] | y_direction | delta to apply to position in the Y direction | - ### relocate_figure - Move a previously made figure to an arbitrary (x,y) location. This differs from the Move methods because it uses absolute coordinates versus relative for Move @@ -3241,7 +2540,6 @@ relocate_figure(figure, y) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3250,56 +2548,44 @@ Parameter Descriptions: | Union[int, float] | x | location on X axis (in user coords) to move the upper left corner of the figure | | Union[int, float] | y | location on Y axis (in user coords) to move the upper left corner of the figure | - ### send_figure_to_back - Changes Z-order of figures on the Graph. Sends the indicated figure to the back of all other drawn figures ``` send_figure_to_back(figure) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | int | figure | value returned by tkinter when creating the figure / drawing | - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -3307,64 +2593,46 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### tk_canvas - - #### property: tk_canvas Returns the underlying tkiner Canvas widget - - |Type|Name|Meaning| |---|---|---| || **return** | The tkinter canvas widget | - - - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -3372,21 +2640,14 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Graph Element. Must call `Window.Read` or `Window.Finalize` prior ``` update(background_color=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3394,13 +2655,9 @@ Parameter Descriptions: | ??? | background_color | color of background | | bool | visible | control visibility of element | - ## Image Element Image Element - show an image in the window. Should be a GIF or a PNG only - - - ``` Image(filename=None, @@ -3416,7 +2673,6 @@ Image(filename=None, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3433,44 +2689,36 @@ Parameter Descriptions: | bool | enable_events | Turns on the element specific events. For an Image element, the event is "image clicked" | | Any | metadata | User metadata that can be set to ANYTHING | - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Image Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -3480,7 +2728,6 @@ Update(filename=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3490,10 +2737,8 @@ Parameter Descriptions: | Tuple[int,int] | size | size of a image (w,h) w=characters-wide, h=rows-high | | bool | visible | control visibility of element | - ### UpdateAnimation - Show an Animated GIF. Call the function as often as you like. The function will determine when to show the next frame and will automatically advance to the next frame at the right time. NOTE - does NOT perform a sleep call to delay @@ -3501,7 +2746,6 @@ NOTE - does NOT perform a sleep call to delay UpdateAnimation(source, time_between_frames=0) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3509,10 +2753,8 @@ Parameter Descriptions: | Union[str,bytes] | source | Filename or Base64 encoded string containing Animated GIF | | int | time_between_frames | Number of milliseconds to wait between showing frames | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -3520,12 +2762,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -3534,31 +2772,18 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -3566,43 +2791,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -3610,47 +2822,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -3658,14 +2859,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Image Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -3675,7 +2870,6 @@ update(filename=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3685,10 +2879,8 @@ Parameter Descriptions: | Tuple[int,int] | size | size of a image (w,h) w=characters-wide, h=rows-high | | bool | visible | control visibility of element | - ### update_animation - Show an Animated GIF. Call the function as often as you like. The function will determine when to show the next frame and will automatically advance to the next frame at the right time. NOTE - does NOT perform a sleep call to delay @@ -3696,7 +2888,6 @@ NOTE - does NOT perform a sleep call to delay update_animation(source, time_between_frames=0) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3704,10 +2895,8 @@ Parameter Descriptions: | Union[str,bytes] | source | Filename or Base64 encoded string containing Animated GIF | | int | time_between_frames | Number of milliseconds to wait between showing frames | - ### update_animation_no_buffering - Show an Animated GIF. Call the function as often as you like. The function will determine when to show the next frame and will automatically advance to the next frame at the right time. NOTE - does NOT perform a sleep call to delay @@ -3715,7 +2904,6 @@ NOTE - does NOT perform a sleep call to delay update_animation_no_buffering(source, time_between_frames=0) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3723,13 +2911,9 @@ Parameter Descriptions: | Union[str,bytes] | source | Filename or Base64 encoded string containing Animated GIF | | int | time_between_frames | Number of milliseconds to wait between showing frames | - ## InputText Element Display a single text input field. Based on the tkinter Widget `Entry` - - - ``` InputText(default_text="", @@ -3753,7 +2937,6 @@ InputText(default_text="", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3778,62 +2961,46 @@ Parameter Descriptions: | bool | visible | set visibility state of the element (Default = True) | | Any | metadata | User metadata that can be set to ANYTHING | - ### Get - - - Read and return the current value of the input element. Must call `Window.Read` or `Window.Finalize` prior `Get()` - - |Type|Name|Meaning| |---|---|---| || **return** | current value of Input field or '' if error encountered | - - - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Input Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -3846,7 +3013,6 @@ Update(value=None, move_cursor_to="end") ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -3859,10 +3025,8 @@ Parameter Descriptions: | str | background_color | change color of the background | | Union[int, str] | move_cursor_to | Moves the cursor to a particular offset. Defaults to 'end' | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -3870,12 +3034,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -3884,49 +3044,28 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get - - - Read and return the current value of the input element. Must call `Window.Read` or `Window.Finalize` prior `get()` - - |Type|Name|Meaning| |---|---|---| || **return** | current value of Input field or '' if error encountered | - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -3934,43 +3073,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -3978,47 +3104,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -4026,14 +3141,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Input Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -4046,7 +3155,6 @@ update(value=None, move_cursor_to="end") ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -4059,14 +3167,10 @@ Parameter Descriptions: | str | background_color | change color of the background | | Union[int, str] | move_cursor_to | Moves the cursor to a particular offset. Defaults to 'end' | - ## Listbox Element A List Box. Provide a list of values for the user to choose one or more of. Returns a list of selected rows when a window.Read() is executed. - - - ``` Listbox(values, @@ -4090,7 +3194,6 @@ Listbox(values, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -4114,97 +3217,70 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### GetIndexes - - - Returns the items currently selected as a list of indexes `GetIndexes()` - - |Type|Name|Meaning| |---|---|---| || **return** | A list of offsets into values that is currently selected | - - - ### GetListValues - - - Returns list of Values provided by the user in the user's format `GetListValues()` - - |Type|Name|Meaning| |---|---|---| || **return** | List of values. Can be any / mixed types -> [] | - - - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### SetValue - Set listbox highlighted choices ``` SetValue(values) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | List[Any] | values | new values to choose based on previously set values | - ### Update - Changes some of the settings for the Listbox Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -4216,7 +3292,6 @@ Update(values=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -4228,10 +3303,8 @@ Parameter Descriptions: | str | mode | changes the select mode according to tkinter's listbox widget | | bool | visible | control visibility of element | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -4239,12 +3312,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -4253,86 +3322,49 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get - - - Returns the list of items currently selected in this listbox. It should be identical to the value you would receive when performing a window.read() call. `get()` - - |Type|Name|Meaning| |---|---|---| || **return** | The list of currently selected items. The actual items are returned, not the indexes | - - - ### get_indexes - - - Returns the items currently selected as a list of indexes `get_indexes()` - - |Type|Name|Meaning| |---|---|---| || **return** | A list of offsets into values that is currently selected | - - - ### get_list_values - - - Returns list of Values provided by the user in the user's format `get_list_values()` - - |Type|Name|Meaning| |---|---|---| || **return** | List of values. Can be any / mixed types -> [] | - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -4340,43 +3372,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -4384,64 +3403,50 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### set_value - Set listbox highlighted choices ``` set_value(values) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | List[Any] | values | new values to choose based on previously set values | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -4449,14 +3454,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Listbox Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -4468,7 +3467,6 @@ update(values=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -4480,7 +3478,6 @@ Parameter Descriptions: | str | mode | changes the select mode according to tkinter's listbox widget | | bool | visible | control visibility of element | - ## Menu Element Menu Element is the Element that provides a Menu Bar that goes across the top of the window, just below titlebar. @@ -4497,9 +3494,6 @@ Parameter Descriptions: Finally, "keys" can be added to entries so make them unique. The "Save" entry has a key associated with it. You can see it has a "::" which signifies the beginning of a key. The user will not see the key portion when the menu is shown. The key portion is returned as part of the event. - - - ``` Menu(menu_definition, @@ -4513,7 +3507,6 @@ Menu(menu_definition, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -4527,51 +3520,42 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Update a menubar - can change the menu definition and visibility. The entire menu has to be specified ``` Update(menu_definition=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -4579,10 +3563,8 @@ Parameter Descriptions: | List[List[Tuple[str, List[str]]] | menu_definition | ??? | | bool | visible | control visibility of element | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -4590,12 +3572,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -4604,31 +3582,18 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -4636,43 +3601,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -4680,47 +3632,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -4728,21 +3669,14 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Update a menubar - can change the menu definition and visibility. The entire menu has to be specified ``` update(menu_definition=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -4750,15 +3684,11 @@ Parameter Descriptions: | List[List[Tuple[str, List[str]]] | menu_definition | ??? | | bool | visible | control visibility of element | - ## Multiline Element 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. - - - ``` Multiline(default_text="", @@ -4783,7 +3713,6 @@ Multiline(default_text="", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -4809,62 +3738,46 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### Get - - - Return current contents of the Multiline Element `Get()` - - |Type|Name|Meaning| |---|---|---| || **return** | current contents of the Multiline Element (used as an input type of Multiline | - - - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Multiline Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -4880,7 +3793,6 @@ Update(value=None, autoscroll=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -4894,10 +3806,8 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | bool | autoscroll | if True then contents of element are scrolled down when new text is added to the end | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -4905,12 +3815,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -4919,49 +3825,28 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get - - - Return current contents of the Multiline Element `get()` - - |Type|Name|Meaning| |---|---|---| || **return** | current contents of the Multiline Element (used as an input type of Multiline | - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -4969,14 +3854,8 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### print - Print like Python normally prints except route the output to a multline element and also add colors if desired ``` @@ -4988,7 +3867,6 @@ print(args=*<1 or N object>, autoscroll=True) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -4999,39 +3877,30 @@ Parameter Descriptions: | str | text_color | The color of the text | | str | background_color | The background color of the line | - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -5039,47 +3908,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -5087,14 +3945,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Multiline Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -5110,7 +3962,6 @@ update(value=None, autoscroll=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -5124,16 +3975,12 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | bool | autoscroll | if True then contents of element are scrolled down when new text is added to the end | - ## OptionMenu Element Option Menu is an Element available ONLY on the tkinter port of PySimpleGUI. It's is a widget that is unique to tkinter. However, it looks much like a ComboBox. Instead of an arrow to click to pull down the list of choices, another little graphic is shown on the widget to indicate where you click. After clicking to activate, it looks like a Combo Box that you scroll to select a choice. - - - ``` OptionMenu(values, @@ -5150,7 +3997,6 @@ OptionMenu(values, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -5167,44 +4013,36 @@ Parameter Descriptions: | str | tooltip | (str) text that will appear when mouse hovers over this element | | bool | visible | (bool) set visibility state of the element | - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the OptionMenu Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -5214,7 +4052,6 @@ Update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -5224,10 +4061,8 @@ Parameter Descriptions: | bool | disabled | disable or enable state of the element | | bool | visible | control visibility of element | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -5235,13 +4070,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -5250,31 +4080,18 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -5282,43 +4099,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -5326,47 +4130,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -5374,14 +4167,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the OptionMenu Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -5391,7 +4178,6 @@ update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -5401,13 +4187,9 @@ Parameter Descriptions: | bool | disabled | disable or enable state of the element | | bool | visible | control visibility of element | - ## Output Element Output Element - a multi-lined text area where stdout and stderr are re-routed to. - - - ``` Output(size=(None, None), @@ -5422,7 +4204,6 @@ Output(size=(None, None), metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -5438,86 +4219,62 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### Get - - - Returns the current contents of the output. Similar to Get method other Elements `Get()` - - |Type|Name|Meaning| |---|---|---| || **return** | the current value of the output | - - - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### TKOut - - #### property: TKOut Returns the TKOutput object used to create the element - - |Type|Name|Meaning| |---|---|---| || **return** | The TKOutput object | - - - ### Update - Changes some of the settings for the Output Element. Must call `Window.Read` or `Window.Finalize` prior ``` Update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -5525,10 +4282,8 @@ Parameter Descriptions: | str | value | string that will replace current contents of the output area | | bool | visible | control visibility of element | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -5536,12 +4291,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -5550,7 +4301,6 @@ expand(expand_x=False, expand_row=True) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -5558,29 +4308,18 @@ Parameter Descriptions: | Bool | expand_x | If True Element will expand in the Horizontal directions | | Bool | expand_y | If True Element will expand in the Vertical directions | - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -5588,43 +4327,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -5632,64 +4358,46 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### tk_out - - #### property: tk_out Returns the TKOutput object used to create the element - - |Type|Name|Meaning| |---|---|---| || **return** | The TKOutput object | - - - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -5697,21 +4405,14 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Output Element. Must call `Window.Read` or `Window.Finalize` prior ``` update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -5719,13 +4420,9 @@ Parameter Descriptions: | str | value | string that will replace current contents of the output area | | bool | visible | control visibility of element | - ## Pane Element A sliding Pane that is unique to tkinter. Uses Columns to create individual panes - - - ``` Pane(pane_list, @@ -5742,7 +4439,6 @@ Pane(pane_list, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -5760,61 +4456,50 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Pane Element. Must call `Window.Read` or `Window.Finalize` prior ``` Update(visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | visible | control visibility of element | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -5822,12 +4507,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -5836,31 +4517,18 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -5868,43 +4536,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -5912,47 +4567,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -5960,34 +4604,23 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Pane Element. Must call `Window.Read` or `Window.Finalize` prior ``` update(visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | visible | control visibility of element | - ## ProgressBar Element Progress Bar Element - Displays a colored bar that is shaded as progress of some operation is made - - - ``` ProgressBar(max_value, @@ -6004,7 +4637,6 @@ ProgressBar(max_value, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -6022,68 +4654,56 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the ProgressBar Element. Must call `Window.Read` or `Window.Finalize` prior ``` Update(visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | visible | control visibility of element | - ### UpdateBar - Change what the bar shows by changing the current count and optionally the max count ``` UpdateBar(current_count, max=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -6091,10 +4711,8 @@ Parameter Descriptions: | int | current_count | sets the current value | | int | max | changes the max value | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -6102,12 +4720,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -6116,31 +4730,18 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -6148,43 +4749,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -6192,47 +4780,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -6240,38 +4817,28 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the ProgressBar Element. Must call `Window.Read` or `Window.Finalize` prior ``` update(visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | visible | control visibility of element | - ### update_bar - Change what the bar shows by changing the current count and optionally the max count ``` update_bar(current_count, max=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -6279,14 +4846,10 @@ Parameter Descriptions: | int | current_count | sets the current value | | int | max | changes the max value | - ## Radio Element Radio Button Element - Used in a group of other Radio Elements to provide user with ability to select only 1 choice in a list of choices. - - - ``` Radio(text, @@ -6307,7 +4870,6 @@ Radio(text, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -6329,77 +4891,54 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### Get - - - A snapshot of the value of Radio Button -> (bool) `Get()` - - |Type|Name|Meaning| |---|---|---| || **return** | True if this radio button is selected | - - - ### ResetGroup - - Sets all Radio Buttons in the group to not selected ```python ResetGroup() ``` - - - - - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Radio Button Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -6408,7 +4947,6 @@ Update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -6417,10 +4955,8 @@ Parameter Descriptions: | bool | disabled | disable or enable state of the element | | bool | visible | control visibility of element | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -6428,12 +4964,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -6442,49 +4974,28 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get - - - A snapshot of the value of Radio Button -> (bool) `get()` - - |Type|Name|Meaning| |---|---|---| || **return** | True if this radio button is selected | - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -6492,58 +5003,38 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### reset_group - - Sets all Radio Buttons in the group to not selected ```python reset_group() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -6551,47 +5042,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -6599,14 +5079,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Radio Button Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -6615,7 +5089,6 @@ update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -6624,13 +5097,9 @@ Parameter Descriptions: | bool | disabled | disable or enable state of the element | | bool | visible | control visibility of element | - ## Slider Element A slider, horizontal or vertical - - - ``` Slider(range=(None, None), @@ -6655,7 +5124,6 @@ Slider(range=(None, None), metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -6681,44 +5149,36 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Slider Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -6728,7 +5188,6 @@ Update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -6738,10 +5197,8 @@ Parameter Descriptions: | bool | disabled | disable or enable state of the element | | bool | visible | control visibility of element | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -6749,12 +5206,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -6763,31 +5216,18 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -6795,43 +5235,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -6839,47 +5266,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -6887,14 +5303,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Slider Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -6904,7 +5314,6 @@ update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -6914,13 +5323,9 @@ Parameter Descriptions: | bool | disabled | disable or enable state of the element | | bool | visible | control visibility of element | - ## Spin Element A spinner with up/down buttons and a single line of text. Choose 1 values from list - - - ``` Spin(values, @@ -6940,7 +5345,6 @@ Spin(values, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -6961,64 +5365,48 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### Get - - - Return the current chosen value showing in spinbox. This value will be the same as what was provided as list of choices. If list items are ints, then the item returned will be an int (not a string) `Get()` - - |Type|Name|Meaning| |---|---|---| || **return** | The currently visible entry | - - - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Spin Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -7028,7 +5416,6 @@ Update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -7038,10 +5425,8 @@ Parameter Descriptions: | bool | disabled | disable or enable state of the element | | bool | visible | control visibility of element | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -7049,12 +5434,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -7063,51 +5444,30 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get - - - Return the current chosen value showing in spinbox. This value will be the same as what was provided as list of choices. If list items are ints, then the item returned will be an int (not a string) `get()` - - |Type|Name|Meaning| |---|---|---| || **return** | The currently visible entry | - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -7115,43 +5475,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -7159,47 +5506,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -7207,14 +5543,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Spin Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -7224,7 +5554,6 @@ update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -7234,13 +5563,9 @@ Parameter Descriptions: | bool | disabled | disable or enable state of the element | | bool | visible | control visibility of element | - ## StatusBar Element A StatusBar Element creates the sunken text-filled strip at the bottom. Many Windows programs have this line - - - ``` StatusBar(text, @@ -7260,7 +5585,6 @@ StatusBar(text, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -7281,44 +5605,36 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Status Bar Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -7329,7 +5645,6 @@ Update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -7340,10 +5655,8 @@ Parameter Descriptions: | Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | | bool | visible | set visibility state of the element | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -7351,12 +5664,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -7365,31 +5674,18 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -7397,43 +5693,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -7441,47 +5724,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -7489,14 +5761,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Status Bar Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -7507,7 +5773,6 @@ update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -7518,14 +5783,11 @@ Parameter Descriptions: | Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | | bool | visible | set visibility state of the element | - ## SystemTray A "Simulated System Tray" that duplicates the API calls available to PySimpleGUIWx and PySimpleGUIQt users. All of the functionality works. The icon is displayed ABOVE the system tray rather than inside of it. - - SystemTray - create an icon in the system tray @@ -7538,7 +5800,6 @@ SystemTray(menu=None, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -7550,52 +5811,32 @@ Parameter Descriptions: | str | tooltip | tooltip string | | Any | metadata | User metadata that can be set to ANYTHING | - ### Close - - Close the system tray window ```python Close() ``` - - - - - ### Hide - - Hides the icon ```python Hide() ``` - - - - - ### Read - Reads the context menu ``` Read(timeout=None) ``` - - - ### ShowMessage - Shows a balloon above icon in system tray ``` @@ -7608,7 +5849,6 @@ ShowMessage(title, time=(1000, 3000)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -7621,25 +5861,16 @@ Parameter Descriptions: | Union[int, Tuple[int, int]] | time | Amount of time to display message in milliseconds. If tuple, first item is fade in/out duration | | (Any) | **RETURN** | The event that happened during the display such as user clicked on message - ### UnHide - - Restores a previously hidden icon ```python UnHide() ``` - - - - - ### Update - Updates the menu, tooltip or icon ``` @@ -7650,7 +5881,6 @@ Update(menu=None, data_base64=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -7661,40 +5891,24 @@ Parameter Descriptions: | ??? | data | icon raw image | | ??? | data_base64 | icon base 64 image | - ### close - - Close the system tray window ```python close() ``` - - - - - ### hide - - Hides the icon ```python hide() ``` - - - - - ### notify - Displays a "notification window", usually in the bottom right corner of your display. Has an icon, a title, and a message The window will slowly fade in and out if desired. Clicking on the window will cause it to move through the end the current "phase". For example, if the window was fading in and it was clicked, then it would immediately stop fading in and instead be fully visible. It's a way for the user to quickly dismiss the window. @@ -7708,7 +5922,6 @@ notify(title, location=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -7722,22 +5935,16 @@ Parameter Descriptions: | Tuple[int, int] | location | Location on the screen to display the window | | (int) | **RETURN** | (int) reason for returning - ### read - Reads the context menu ``` read(timeout=None) ``` - - - ### show_message - Shows a balloon above icon in system tray ``` @@ -7750,7 +5957,6 @@ show_message(title, time=(1000, 3000)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -7763,25 +5969,16 @@ Parameter Descriptions: | Union[int, Tuple[int, int]] | time | Amount of time to display message in milliseconds. If tuple, first item is fade in/out duration | | (Any) | **RETURN** | The event that happened during the display such as user clicked on message - ### un_hide - - Restores a previously hidden icon ```python un_hide() ``` - - - - - ### update - Updates the menu, tooltip or icon ``` @@ -7792,7 +5989,6 @@ update(menu=None, data_base64=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -7803,14 +5999,10 @@ Parameter Descriptions: | ??? | data | icon raw image | | ??? | data_base64 | icon base 64 image | - ## Tab Element Tab Element is another "Container" element that holds a layout and displays a tab with text. Used with TabGroup only Tabs are never placed directly into a layout. They are always "Contained" in a TabGroup layout - - - ``` Tab(title, @@ -7829,7 +6021,6 @@ Tab(title, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -7849,96 +6040,72 @@ Parameter Descriptions: | str | element_justification | All elements inside the Tab will have this justification 'left', 'right', 'center' are valid values | | Any | metadata | User metadata that can be set to ANYTHING | - ### AddRow - Not recommended use call. Used to add rows of Elements to the Frame Element. ``` AddRow(args=*<1 or N object>) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | List[Element] | *args | The list of elements for this row | - ### Layout - Not user callable. Use layout parameter instead. Creates the layout using the supplied rows of Elements ``` Layout(rows) -> (Tab) used for chaining ``` - - - - ### Select - - Create a tkinter event that mimics user clicking on a tab. Must have called window.Finalize / Read first! ```python Select() ``` - - - - - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Tab Element. Must call `Window.Read` or `Window.Finalize` prior ``` Update(disabled=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -7946,27 +6113,22 @@ Parameter Descriptions: | bool | disabled | disable or enable state of the element | | bool | visible | control visibility of element | - ### add_row - Not recommended use call. Used to add rows of Elements to the Frame Element. ``` add_row(args=*<1 or N object>) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | List[Element] | *args | The list of elements for this row | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -7974,12 +6136,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -7988,31 +6146,18 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -8020,71 +6165,46 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### layout - Not user callable. Use layout parameter instead. Creates the layout using the supplied rows of Elements ``` layout(rows) -> (Tab) used for chaining ``` - - - - ### select - - Create a tkinter event that mimics user clicking on a tab. Must have called window.Finalize / Read first! ```python select() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -8092,47 +6212,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -8140,21 +6249,14 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Tab Element. Must call `Window.Read` or `Window.Finalize` prior ``` update(disabled=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -8162,13 +6264,9 @@ Parameter Descriptions: | bool | disabled | disable or enable state of the element | | bool | visible | control visibility of element | - ## TabGroup Element TabGroup Element groups together your tabs into the group of tabs you see displayed in your window - - - ``` TabGroup(layout, @@ -8190,7 +6288,6 @@ TabGroup(layout, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -8213,18 +6310,14 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - - ### FindKeyFromTabName - Searches through the layout to find the key that matches the text on the tab. Implies names should be unique ``` FindKeyFromTabName(tab_name) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -8232,12 +6325,8 @@ Parameter Descriptions: | str | tab_name | name of a tab | | Union[key, None] | **RETURN** | Returns the key or None if no key found - ### Get - - - Returns the current value for the Tab Group, which will be the currently selected tab's KEY or the text on the tab if no key is defined. Returns None if an error occurs. Note that this is exactly the same data that would be returned from a call to Window.Read. Are you sure you @@ -8245,52 +6334,40 @@ are using this method correctly? `Get()` - - |Type|Name|Meaning| |---|---|---| || **return** | The key of the currently selected tab or the tab's text if it has no key | - - - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -8298,12 +6375,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -8312,19 +6385,14 @@ expand(expand_x=False, expand_row=True) ``` - - - ### find_key_from_tab_name - Searches through the layout to find the key that matches the text on the tab. Implies names should be unique ``` find_key_from_tab_name(tab_name) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -8332,12 +6400,8 @@ Parameter Descriptions: | str | tab_name | name of a tab | | Union[key, None] | **RETURN** | Returns the key or None if no key found - ### get - - - Returns the current value for the Tab Group, which will be the currently selected tab's KEY or the text on the tab if no key is defined. Returns None if an error occurs. Note that this is exactly the same data that would be returned from a call to Window.Read. Are you sure you @@ -8345,37 +6409,22 @@ are using this method correctly? `get()` - - |Type|Name|Meaning| |---|---|---| || **return** | The key of the currently selected tab or the tab's text if it has no key | - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -8383,44 +6432,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -8428,47 +6463,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -8476,16 +6500,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ## Table Element - - - ``` Table(values, headings=None, @@ -8521,7 +6537,6 @@ Table(values, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -8559,64 +6574,48 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### Get - - - Dummy function for tkinter port. In the Qt port you can read back the values in the table in case they were edited. Don't know yet how to enable editing of a Tree in tkinter so just returning the values provided by user when Table was created or Updated. `Get()` - - |Type|Name|Meaning| |---|---|---| || **return** | the current table values (for now what was originally provided up updated) | - - - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Table Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -8628,7 +6627,6 @@ Update(values=None, row_colors=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -8640,10 +6638,8 @@ Parameter Descriptions: | str | alternating_row_color | the color to make every other row | | List[Union[Tuple[int, str], Tuple[Int, str, str]] | row_colors | list of tuples of (row, background color) OR (row, foreground color, background color). Changes the colors of listed rows to the color(s) provided (note the optional foreground color) | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -8651,13 +6647,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -8666,51 +6657,30 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get - - - Dummy function for tkinter port. In the Qt port you can read back the values in the table in case they were edited. Don't know yet how to enable editing of a Tree in tkinter so just returning the values provided by user when Table was created or Updated. `get()` - - |Type|Name|Meaning| |---|---|---| || **return** | the current table values (for now what was originally provided up updated) | - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -8718,43 +6688,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -8762,47 +6719,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -8810,14 +6756,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Table Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -8829,7 +6769,6 @@ update(values=None, row_colors=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -8841,13 +6780,9 @@ Parameter Descriptions: | str | alternating_row_color | the color to make every other row | | List[Union[Tuple[int, str], Tuple[Int, str, str]] | row_colors | list of tuples of (row, background color) OR (row, foreground color, background color). Changes the colors of listed rows to the color(s) provided (note the optional foreground color) | - ## Text Element Text - Display some text in the window. Usually this means a single line of text. However, the text can also be multiple lines. If multi-lined there are no scroll bars. - - - ``` Text(text="", @@ -8869,7 +6804,6 @@ Text(text="", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -8892,62 +6826,46 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - #### Get - - - Gets the current value of the displayed text `Get()` - - |Type|Name|Meaning| |---|---|---| || **return** | The current value | - - - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Text Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -8958,7 +6876,6 @@ Update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -8969,10 +6886,8 @@ Parameter Descriptions: | Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | | bool | visible | set visibility state of the element | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -8980,12 +6895,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -8994,49 +6905,28 @@ expand(expand_x=False, expand_row=True) ``` - - - #### get - - - Gets the current value of the displayed text `get()` - - |Type|Name|Meaning| |---|---|---| || **return** | The current value | - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -9044,43 +6934,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -9088,47 +6965,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -9136,14 +7002,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Text Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -9154,7 +7014,6 @@ update(value=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -9165,15 +7024,10 @@ Parameter Descriptions: | Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | | bool | visible | set visibility state of the element | - - ## Tree Element Tree Element - Presents data in a tree-like manner, much like a file/folder browser. Uses the TreeData class to hold the user's data and pass to the element for display. - - - ``` Tree(data=None, @@ -9205,7 +7059,6 @@ Tree(data=None, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -9238,44 +7091,36 @@ Parameter Descriptions: | bool | visible | set visibility state of the element | | Any | metadata | User metadata that can be set to ANYTHING | - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### Update - Changes some of the settings for the Tree Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -9287,7 +7132,6 @@ Update(values=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -9299,27 +7143,22 @@ Parameter Descriptions: | Union[bytes, str] | icon | can be either a base64 icon or a filename for the icon | | bool | visible | control visibility of element | - ### add_treeview_data - Not a user function. Recursive method that inserts tree data into the tkinter treeview widget. ``` add_treeview_data(node) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | TreeData | node | The node to insert. Will insert all nodes from starting point downward, recursively | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -9327,12 +7166,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -9341,31 +7176,18 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -9373,43 +7195,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -9417,47 +7226,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -9465,14 +7263,8 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ### update - Changes some of the settings for the Tree Element. Must call `Window.Read` or `Window.Finalize` prior ``` @@ -9484,7 +7276,6 @@ update(values=None, visible=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -9496,15 +7287,11 @@ Parameter Descriptions: | Union[bytes, str] | icon | can be either a base64 icon or a filename for the icon | | bool | visible | control visibility of element | - ## TreeData (for Tree Element) Class that user fills in to represent their tree data. It's a very simple tree representation with a root "Node" with possibly one or more children "Nodes". Each Node contains a key, text to display, list of values to display and an icon. The entire tree is built using a single method, Insert. Nothing else is required to make the tree. - - - Instantiate the object, initializes the Tree Data, creates a root node for you @@ -9512,14 +7299,8 @@ Instantiate the object, initializes the Tree Data, creates a root node for you TreeData() ``` - - - - - ### Insert - Inserts a node into the tree. This is how user builds their tree, by Inserting Nodes This is the ONLY user callable method in the TreeData class @@ -9531,7 +7312,6 @@ Insert(parent, icon=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -9542,10 +7322,8 @@ Parameter Descriptions: | List[Any] | values | The list of values that are displayed at this node | | Union[str, bytes] | icon | icon | - ### Node - Contains information about the individual node in the tree ``` @@ -9556,12 +7334,8 @@ Node(parent, icon=None) ``` - - - ### insert - Inserts a node into the tree. This is how user builds their tree, by Inserting Nodes This is the ONLY user callable method in the TreeData class @@ -9573,7 +7347,6 @@ insert(parent, icon=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -9584,64 +7357,51 @@ Parameter Descriptions: | List[Any] | values | The list of values that are displayed at this node | | Union[str, bytes] | icon | icon | - ## VerticalSeparator Element Vertical Separator Element draws a vertical line at the given location. It will span 1 "row". Usually paired with Column Element if extra height is needed - - - ``` VerticalSeparator(pad=None) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | - ### SetFocus - Sets the current focus to be on this element ``` SetFocus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### SetTooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` SetTooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### bind - Used to add tkinter events to an Element. The tkinter specific data is in the Element's member variable user_bind_event @@ -9649,12 +7409,8 @@ The tkinter specific data is in the Element's member variable user_bind_event bind(bind_string, key_modifier) ``` - - - ### expand - Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` @@ -9663,31 +7419,18 @@ expand(expand_x=False, expand_row=True) ``` - - - ### get_size - - - Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. `get_size()` - - |Type|Name|Meaning| |---|---|---| || **return** | width and height of the element | - - - ### hide_row - - Hide the entire row an Element is located on. Use this if you must have all space removed when you are hiding an element, including the row container @@ -9695,43 +7438,30 @@ Hide the entire row an Element is located on. hide_row() ``` - - - - - ### set_cursor - Sets the cursor for the current Element. ``` set_cursor(cursor) ``` - - - ### set_focus - Sets the current focus to be on this element ``` set_focus(force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | - ### set_size - Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. @@ -9739,47 +7469,36 @@ It's possible to specify None for one of sizes so that only 1 of the element's d set_size(size=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | size | The size in characters, rows typically. In some cases they are pixels | - ### set_tooltip - Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip'). ``` set_tooltip(tooltip_text) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tooltip_text | the text to show in tooltip. | - ### unbind - Removes a previously bound tkinter event from an Element. ``` unbind(bind_string) ``` - - - ### unhide_row - - Unhides (makes visible again) the row container that the Element is located on. Note that it will re-appear at the bottom of the window / container, most likely. @@ -9787,17 +7506,9 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` - - - - - ## Window Represents a single Window - - - ``` Window(title, @@ -9839,7 +7550,6 @@ Window(title, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -9882,10 +7592,8 @@ Parameter Descriptions: | bool | use_ttk_buttons | Affects all buttons in window. True = use ttk buttons. False = do not use ttk buttons. None = use ttk buttons only if on a Mac | | Any | metadata | User metadata that can be set to ANYTHING | - ### AddRow - Adds a single row of elements to a window's self.Rows variables. Generally speaking this is NOT how users should be building Window layouts. Users, create a single layout (a list of lists) and pass as a parameter to Window object, or call Window.Layout(layout) @@ -9894,12 +7602,8 @@ Users, create a single layout (a list of lists) and pass as a parameter to Windo AddRow(args=*<1 or N object>) ``` - - - ### AddRows - Loops through a list of lists of elements and adds each row, list, to the layout. This is NOT the best way to go about creating a window. Sending the entire layout at one time and passing it as a parameter to the Window call is better. @@ -9908,30 +7612,18 @@ it as a parameter to the Window call is better. AddRows(rows) ``` - - - ### AlphaChannel - - #### property: AlphaChannel A property that changes the current alpha channel value (internal value) - - |Type|Name|Meaning| |---|---|---| || **return** | (float) the current alpha channel setting according to self, not read directly from tkinter | - - - ### BringToFront - - Brings this window to the top of all other windows (perhaps may not be brought before a window made to "stay on top") @@ -9939,15 +7631,8 @@ Brings this window to the top of all other windows (perhaps may not be brought b BringToFront() ``` - - - - - ### Close - - Closes window. Users can safely call even if window has been destroyed. Should always call when done with a window so that resources are properly freed up within your thread. @@ -9955,63 +7640,34 @@ Closes window. Users can safely call even if window has been destroyed. Shoul Close() ``` - - - - - ### CurrentLocation - - - Get the current location of the window's top left corner `CurrentLocation()` - - |Type|Name|Meaning| |---|---|---| || **return** | The x and y location in tuple form (x,y) | - - - ### Disable - - Disables window from taking any input from the user ```python Disable() ``` - - - - - ### DisableDebugger - - Disable the internal debugger. By default the debugger is ENABLED ```python DisableDebugger() ``` - - - - - ### Disappear - - Causes a window to "disappear" from the screen, but remain on the taskbar. It does this by turning the alpha channel to 0. NOTE that on some platforms alpha is not supported. The window will remain showing on these platforms. The Raspberry Pi for example does not have an alpha setting @@ -10020,14 +7676,8 @@ Causes a window to "disappear" from the screen, but remain on the taskbar. It do Disappear() ``` - - - - - ### Elem - Find element object associated with the provided key. THIS METHOD IS NO LONGER NEEDED to be called by the user @@ -10051,7 +7701,6 @@ checked for. Elem(key, silent_on_error=False) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -10060,10 +7709,8 @@ Parameter Descriptions: | bool | silent_on_error | If True do not display popup nor print warning of key errors | | Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; - ### Element - Find element object associated with the provided key. THIS METHOD IS NO LONGER NEEDED to be called by the user @@ -10087,7 +7734,6 @@ checked for. Element(key, silent_on_error=False) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -10096,47 +7742,30 @@ Parameter Descriptions: | bool | silent_on_error | If True do not display popup nor print warning of key errors | | Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; - ### Enable - - Re-enables window to take user input after having it be Disabled previously ```python Enable() ``` - - - - - ### EnableDebugger - - Enables the internal debugger. By default, the debugger IS enabled ```python EnableDebugger() ``` - - - - - ### Fill - Fill in elements that are input fields with data based on a 'values dictionary' ``` Fill(values_dict) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -10144,30 +7773,20 @@ Parameter Descriptions: | (Dict[Any:Any]) | values_dict | {Element key : value} pairs | | (Window) | **RETURN** | returns self so can be chained with other methods - ### Finalize - - - Use this method to cause your layout to built into a real tkinter window. In reality this method is like Read(timeout=0). It doesn't block and uses your layout to create tkinter widgets to represent the elements. Lots of action! `Finalize()` - - |Type|Name|Meaning| |---|---|---| || **return** | Returns 'self' so that method "Chaining" can happen (read up about it as it's very cool!) | - - - ### Find - Find element object associated with the provided key. THIS METHOD IS NO LONGER NEEDED to be called by the user @@ -10191,7 +7810,6 @@ checked for. Find(key, silent_on_error=False) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -10200,10 +7818,8 @@ Parameter Descriptions: | bool | silent_on_error | If True do not display popup nor print warning of key errors | | Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; - ### FindElement - Find element object associated with the provided key. THIS METHOD IS NO LONGER NEEDED to be called by the user @@ -10227,7 +7843,6 @@ checked for. FindElement(key, silent_on_error=False) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -10236,47 +7851,28 @@ Parameter Descriptions: | bool | silent_on_error | If True do not display popup nor print warning of key errors | | Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; - ### FindElementWithFocus - - - Returns the Element that currently has focus as reported by tkinter. If no element is found None is returned! `FindElementWithFocus()` - - |Type|Name|Meaning| |---|---|---| || **return** | An Element if one has been found with focus or None if no element found | - - - ### GetScreenDimensions - - - Get the screen dimensions. NOTE - you must have a window already open for this to work (blame tkinter not me) `GetScreenDimensions()` - - |Type|Name|Meaning| |---|---|---| || **return** | Tuple containing width and height of screen in pixels | - - - ### GrabAnyWhereOff - - Turns off Grab Anywhere functionality AFTER a window has been created. Don't try on a window that's not yet been Finalized or Read. @@ -10284,15 +7880,8 @@ Turns off Grab Anywhere functionality AFTER a window has been created. Don't tr GrabAnyWhereOff() ``` - - - - - ### GrabAnyWhereOn - - Turns on Grab Anywhere functionality AFTER a window has been created. Don't try on a window that's not yet been Finalized or Read. @@ -10300,29 +7889,16 @@ Turns on Grab Anywhere functionality AFTER a window has been created. Don't try GrabAnyWhereOn() ``` - - - - - ### Hide - - Hides the window from the screen and the task bar ```python Hide() ``` - - - - - ### Layout - Second of two preferred ways of telling a Window what its layout is. The other way is to pass the layout as a parameter to Window object. The parameter method is the currently preferred method. This call to Layout has been removed from examples contained in documents and in the Demo Programs. Trying to remove this call @@ -10332,7 +7908,6 @@ from history and replace with sending as a parameter to Window. Layout(rows) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -10340,28 +7915,22 @@ Parameter Descriptions: | List[List[Elements]] | rows | Your entire layout | | (Window) | **RETURN** | self so that you can chain method calls - ### LoadFromDisk - Restore values from a previous call to SaveToDisk which saves the returned values dictionary in Pickle format ``` LoadFromDisk(filename) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | filename | Pickle Filename to load | - ### Maximize - - Maximize the window. This is done differently on a windows system versus a linux or mac one. For non-Windows the root attribute '-fullscreen' is set to True. For Windows the "root" state is changed to "zoomed" The reason for the difference is the title bar is removed in some cases when using fullscreen option @@ -10370,36 +7939,22 @@ Maximize the window. This is done differently on a windows system versus a linux Maximize() ``` - - - - - ### Minimize - - Minimize this window to the task bar ```python Minimize() ``` - - - - - ### Move - Move the upper left corner of this window to the x,y coordinates provided ``` Move(x, y) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -10407,25 +7962,16 @@ Parameter Descriptions: | int | x | x coordinate in pixels | | int | y | y coordinate in pixels | - ### Normal - - Restore a window to a non-maximized state. Does different things depending on platform. See Maximize for more. ```python Normal() ``` - - - - - ### Read - THE biggest deal method in the Window class! This is how you get all of your data from your Window. Pass in a timeout (in milliseconds) to wait for a maximum of timeout milliseconds. Will return timeout_key if no other GUI events happen first. @@ -10436,7 +7982,6 @@ Read(timeout=None, close=False) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -10446,45 +7991,28 @@ Parameter Descriptions: | bool | close | if True the window will be closed prior to returning | | Tuple[(Any), Union[Dict[Any:Any]], List[Any], None] | **RETURN** | (event, values) - ### Reappear - - Causes a window previously made to "Disappear" (using that method). Does this by restoring the alpha channel ```python Reappear() ``` - - - - - ### Refresh - - - Refreshes the window by calling tkroot.update(). Can sometimes get away with a refresh instead of a Read. Use this call when you want something to appear in your Window immediately (as soon as this function is called). Without this call your changes to a Window will not be visible to the user until the next Read call `Refresh()` - - |Type|Name|Meaning| |---|---|---| || **return** | `self` so that method calls can be easily "chained" | - - - ### SaveToDisk - Saves the values contained in each of the input areas of the form. Basically saves what would be returned from a call to Read. It takes these results and saves them to disk using pickle. Note that every element in your layout that is to be saved must have a key assigned to it. @@ -10492,49 +8020,36 @@ Saves the values contained in each of the input areas of the form. Basically sav SaveToDisk(filename) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | filename | Filename to save the values to in pickled form | - ### SendToBack - - Pushes this window to the bottom of the stack of windows. It is the opposite of BringToFront ```python SendToBack() ``` - - - - - ### SetAlpha - Sets the Alpha Channel for a window. Values are between 0 and 1 where 0 is completely transparent ``` SetAlpha(alpha) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | float | alpha | 0 to 1. 0 is completely transparent. 1 is completely visible and solid (can't see through) | - ### SetIcon - Changes the icon that is shown on the title bar and on the task bar. NOTE - The file type is IMPORTANT and depends on the OS! Can pass in: @@ -10546,7 +8061,6 @@ Can pass in: SetIcon(icon=None, pngbase64=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -10554,78 +8068,51 @@ Parameter Descriptions: | str | icon | Filename or bytes object | | str | pngbase64 | Base64 encoded image | - ### SetTransparentColor - Set the color that will be transparent in your window. Areas with this color will be SEE THROUGH. ``` SetTransparentColor(color) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | color | Color string that defines the transparent color | - ### Size - - #### property: Size Return the current size of the window in pixels - - |Type|Name|Meaning| |---|---|---| || **return** | (width, height) of the window | - - - ### UnHide - - Used to bring back a window that was previously hidden using the Hide method ```python UnHide() ``` - - - - - ### VisibilityChanged - - - This is a completely dummy method that does nothing. It is here so that PySimpleGUIQt programs can make this call and then have that same source run on plain PySimpleGUI. `VisibilityChanged()` - - |Type|Name|Meaning| |---|---|---| || **return** | | - - - ### add_row - Adds a single row of elements to a window's self.Rows variables. Generally speaking this is NOT how users should be building Window layouts. Users, create a single layout (a list of lists) and pass as a parameter to Window object, or call Window.Layout(layout) @@ -10634,12 +8121,8 @@ Users, create a single layout (a list of lists) and pass as a parameter to Windo add_row(args=*<1 or N object>) ``` - - - ### add_rows - Loops through a list of lists of elements and adds each row, list, to the layout. This is NOT the best way to go about creating a window. Sending the entire layout at one time and passing it as a parameter to the Window call is better. @@ -10648,29 +8131,18 @@ it as a parameter to the Window call is better. add_rows(rows) ``` - - - ### alpha_channel - - #### property: alpha_channel A property that changes the current alpha channel value (internal value) - - |Type|Name|Meaning| |---|---|---| || **return** | (float) the current alpha channel setting according to self, not read directly from tkinter | - - - ### bind - Used to add tkinter events to a Window. The tkinter specific data is in the Window's member variable user_bind_event @@ -10678,7 +8150,6 @@ The tkinter specific data is in the Window's member variable user_bind_event bind(bind_string, key) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -10686,11 +8157,8 @@ Parameter Descriptions: | str | bind_string | The string tkinter expected in its bind function | | Any | key | The event that will be generated when the tkinter event occurs | - ### bring_to_front - - Brings this window to the top of all other windows (perhaps may not be brought before a window made to "stay on top") @@ -10698,15 +8166,8 @@ Brings this window to the top of all other windows (perhaps may not be brought b bring_to_front() ``` - - - - - ### close - - Closes window. Users can safely call even if window has been destroyed. Should always call when done with a window so that resources are properly freed up within your thread. @@ -10714,63 +8175,34 @@ Closes window. Users can safely call even if window has been destroyed. Shoul close() ``` - - - - - ### current_location - - - Get the current location of the window's top left corner `current_location()` - - |Type|Name|Meaning| |---|---|---| || **return** | The x and y location in tuple form (x,y) | - - - ### disable - - Disables window from taking any input from the user ```python disable() ``` - - - - - ### disable_debugger - - Disable the internal debugger. By default the debugger is ENABLED ```python disable_debugger() ``` - - - - - ### disappear - - Causes a window to "disappear" from the screen, but remain on the taskbar. It does this by turning the alpha channel to 0. NOTE that on some platforms alpha is not supported. The window will remain showing on these platforms. The Raspberry Pi for example does not have an alpha setting @@ -10779,14 +8211,8 @@ Causes a window to "disappear" from the screen, but remain on the taskbar. It do disappear() ``` - - - - - ### elem - Find element object associated with the provided key. THIS METHOD IS NO LONGER NEEDED to be called by the user @@ -10810,7 +8236,6 @@ checked for. elem(key, silent_on_error=False) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -10819,10 +8244,8 @@ Parameter Descriptions: | bool | silent_on_error | If True do not display popup nor print warning of key errors | | Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; - ### element - Find element object associated with the provided key. THIS METHOD IS NO LONGER NEEDED to be called by the user @@ -10846,7 +8269,6 @@ checked for. element(key, silent_on_error=False) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -10855,65 +8277,40 @@ Parameter Descriptions: | bool | silent_on_error | If True do not display popup nor print warning of key errors | | Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; - ### element_list - - - Returns a list of all elements in the window `element_list()` - - |Type|Name|Meaning| |---|---|---| || **return** | List of all elements in the window and container elements in the window | - - - ### enable - - Re-enables window to take user input after having it be Disabled previously ```python enable() ``` - - - - - ### enable_debugger - - Enables the internal debugger. By default, the debugger IS enabled ```python enable_debugger() ``` - - - - - ### extend_layout - Adds new rows to an existing container element inside of this window ``` extend_layout(container, rows) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -10922,17 +8319,14 @@ Parameter Descriptions: | (List[List[Element]]) | rows | (List[List[Element]]) - The layout to be added | | (Window) | **RETURN** | (Window) self so could be chained - ### fill - Fill in elements that are input fields with data based on a 'values dictionary' ``` fill(values_dict) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -10940,30 +8334,20 @@ Parameter Descriptions: | (Dict[Any:Any]) | values_dict | {Element key : value} pairs | | (Window) | **RETURN** | returns self so can be chained with other methods - ### finalize - - - Use this method to cause your layout to built into a real tkinter window. In reality this method is like Read(timeout=0). It doesn't block and uses your layout to create tkinter widgets to represent the elements. Lots of action! `finalize()` - - |Type|Name|Meaning| |---|---|---| || **return** | Returns 'self' so that method "Chaining" can happen (read up about it as it's very cool!) | - - - ### find - Find element object associated with the provided key. THIS METHOD IS NO LONGER NEEDED to be called by the user @@ -10987,7 +8371,6 @@ checked for. find(key, silent_on_error=False) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -10996,10 +8379,8 @@ Parameter Descriptions: | bool | silent_on_error | If True do not display popup nor print warning of key errors | | Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; - ### find_element - Find element object associated with the provided key. THIS METHOD IS NO LONGER NEEDED to be called by the user @@ -11023,7 +8404,6 @@ checked for. find_element(key, silent_on_error=False) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11032,60 +8412,36 @@ Parameter Descriptions: | bool | silent_on_error | If True do not display popup nor print warning of key errors | | Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; - ### find_element_with_focus - - - Returns the Element that currently has focus as reported by tkinter. If no element is found None is returned! `find_element_with_focus()` - - |Type|Name|Meaning| |---|---|---| || **return** | An Element if one has been found with focus or None if no element found | - - - ### get_screen_dimensions - - - Get the screen dimensions. NOTE - you must have a window already open for this to work (blame tkinter not me) `get_screen_dimensions()` - - |Type|Name|Meaning| |---|---|---| || **return** | Tuple containing width and height of screen in pixels | - - - ### get_screen_size - Returns the size of the "screen" as determined by tkinter. This can vary depending on your operating system and the number of monitors installed on your system. For Windows, the primary monitor's size is returns. On some multi-monitored Linux systems, the monitors are combined and the total size is reported as if one screen. ``` get_screen_size() -> Tuple[int, int] - Size of the screen in pixels as determined by tkinter ``` - - - - ### grab_any_where_off - - Turns off Grab Anywhere functionality AFTER a window has been created. Don't try on a window that's not yet been Finalized or Read. @@ -11093,15 +8449,8 @@ Turns off Grab Anywhere functionality AFTER a window has been created. Don't tr grab_any_where_off() ``` - - - - - ### grab_any_where_on - - Turns on Grab Anywhere functionality AFTER a window has been created. Don't try on a window that's not yet been Finalized or Read. @@ -11109,30 +8458,16 @@ Turns on Grab Anywhere functionality AFTER a window has been created. Don't try grab_any_where_on() ``` - - - - - - ### hide - - Hides the window from the screen and the task bar ```python hide() ``` - - - - - ### layout - Second of two preferred ways of telling a Window what its layout is. The other way is to pass the layout as a parameter to Window object. The parameter method is the currently preferred method. This call to Layout has been removed from examples contained in documents and in the Demo Programs. Trying to remove this call @@ -11142,7 +8477,6 @@ from history and replace with sending as a parameter to Window. layout(rows) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11150,28 +8484,22 @@ Parameter Descriptions: | List[List[Elements]] | rows | Your entire layout | | (Window) | **RETURN** | self so that you can chain method calls - ### load_from_disk - Restore values from a previous call to SaveToDisk which saves the returned values dictionary in Pickle format ``` load_from_disk(filename) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | filename | Pickle Filename to load | - ### maximize - - Maximize the window. This is done differently on a windows system versus a linux or mac one. For non-Windows the root attribute '-fullscreen' is set to True. For Windows the "root" state is changed to "zoomed" The reason for the difference is the title bar is removed in some cases when using fullscreen option @@ -11180,36 +8508,22 @@ Maximize the window. This is done differently on a windows system versus a linux maximize() ``` - - - - - ### minimize - - Minimize this window to the task bar ```python minimize() ``` - - - - - ### move - Move the upper left corner of this window to the x,y coordinates provided ``` move(x, y) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11217,25 +8531,16 @@ Parameter Descriptions: | int | x | x coordinate in pixels | | int | y | y coordinate in pixels | - ### normal - - Restore a window to a non-maximized state. Does different things depending on platform. See Maximize for more. ```python normal() ``` - - - - - ### read - THE biggest deal method in the Window class! This is how you get all of your data from your Window. Pass in a timeout (in milliseconds) to wait for a maximum of timeout milliseconds. Will return timeout_key if no other GUI events happen first. @@ -11246,7 +8551,6 @@ read(timeout=None, close=False) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11256,45 +8560,28 @@ Parameter Descriptions: | bool | close | if True the window will be closed prior to returning | | Tuple[(Any), Union[Dict[Any:Any]], List[Any], None] | **RETURN** | (event, values) - ### reappear - - Causes a window previously made to "Disappear" (using that method). Does this by restoring the alpha channel ```python reappear() ``` - - - - - ### refresh - - - Refreshes the window by calling tkroot.update(). Can sometimes get away with a refresh instead of a Read. Use this call when you want something to appear in your Window immediately (as soon as this function is called). Without this call your changes to a Window will not be visible to the user until the next Read call `refresh()` - - |Type|Name|Meaning| |---|---|---| || **return** | `self` so that method calls can be easily "chained" | - - - ### save_to_disk - Saves the values contained in each of the input areas of the form. Basically saves what would be returned from a call to Read. It takes these results and saves them to disk using pickle. Note that every element in your layout that is to be saved must have a key assigned to it. @@ -11302,49 +8589,36 @@ Saves the values contained in each of the input areas of the form. Basically sav save_to_disk(filename) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | filename | Filename to save the values to in pickled form | - ### send_to_back - - Pushes this window to the bottom of the stack of windows. It is the opposite of BringToFront ```python send_to_back() ``` - - - - - ### set_alpha - Sets the Alpha Channel for a window. Values are between 0 and 1 where 0 is completely transparent ``` set_alpha(alpha) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | float | alpha | 0 to 1. 0 is completely transparent. 1 is completely visible and solid (can't see through) | - ### set_icon - Changes the icon that is shown on the title bar and on the task bar. NOTE - The file type is IMPORTANT and depends on the OS! Can pass in: @@ -11356,7 +8630,6 @@ Can pass in: set_icon(icon=None, pngbase64=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11364,83 +8637,51 @@ Parameter Descriptions: | str | icon | Filename or bytes object | | str | pngbase64 | Base64 encoded image | - ### set_transparent_color - Set the color that will be transparent in your window. Areas with this color will be SEE THROUGH. ``` set_transparent_color(color) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | color | Color string that defines the transparent color | - ### size - - #### property: size Return the current size of the window in pixels - - |Type|Name|Meaning| |---|---|---| || **return** | (width, height) of the window | - - - ### un_hide - - Used to bring back a window that was previously hidden using the Hide method ```python un_hide() ``` - - - - - ### visibility_changed - - - This is a completely dummy method that does nothing. It is here so that PySimpleGUIQt programs can make this call and then have that same source run on plain PySimpleGUI. `visibility_changed()` - - |Type|Name|Meaning| |---|---|---| || **return** | | - - - - ## Function Reference - - - - - ``` CButton(button_text, image_filename=None, @@ -11461,7 +8702,6 @@ CButton(button_text, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11477,10 +8717,6 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - - - Button that will show a calendar chooser window. Fills in the target element with result ``` @@ -11514,7 +8750,6 @@ CalendarButton(button_text, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11548,11 +8783,6 @@ Parameter Descriptions: | Any | metadata | Anything you want to store along with this button | | (Button) | **RETURN** | returns a button - - - - - ``` Cancel(button_text="Cancel", size=(None, None), @@ -11568,7 +8798,6 @@ Cancel(button_text="Cancel", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11582,11 +8811,6 @@ Parameter Descriptions: | (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | bind_return_key | (Default = False) :param focus: if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | - - - - - ``` CloseButton(button_text, image_filename=None, @@ -11607,7 +8831,6 @@ CloseButton(button_text, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11623,11 +8846,6 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - - - - ``` ColorChooserButton(button_text, target=(None, None), @@ -11649,7 +8867,6 @@ ColorChooserButton(button_text, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11665,11 +8882,6 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - - - - ``` Debug(button_text="", size=(None, None), @@ -11685,7 +8897,6 @@ Debug(button_text="", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11700,11 +8911,6 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - - - - ``` DummyButton(button_text, image_filename=None, @@ -11725,7 +8931,6 @@ DummyButton(button_text, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11741,11 +8946,6 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - - - - ``` Exit(button_text="Exit", size=(None, None), @@ -11761,7 +8961,6 @@ Exit(button_text="Exit", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11775,11 +8974,6 @@ Parameter Descriptions: | (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | bind_return_key | (Default = False) :param focus: if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | - - - - - ``` FileBrowse(button_text="Browse", target=(555666777, -1), @@ -11798,7 +8992,6 @@ FileBrowse(button_text="Browse", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11813,11 +9006,6 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - - - - ``` FileSaveAs(button_text="Save As...", target=(555666777, -1), @@ -11836,7 +9024,6 @@ FileSaveAs(button_text="Save As...", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11851,10 +9038,6 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - - - Allows browsing of multiple files. File list is returned as a single list with the delimeter defined using the variable BROWSE_FILES_DELIMETER. This defaults to ';' but is changable by the user @@ -11876,7 +9059,6 @@ FilesBrowse(button_text="Browse", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11891,17 +9073,12 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - - - Fills a window with values provided in a values dictionary { element_key : new_value } ``` FillFormWithValues(window, values_dict) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11909,11 +9086,6 @@ Parameter Descriptions: | Window | window | The window object to fill | | (Dict[Any:Any]) | values_dict | A dictionary with element keys as key and value is values parm for Update call | - - - - - ``` FolderBrowse(button_text="Browse", target=(555666777, -1), @@ -11931,7 +9103,6 @@ FolderBrowse(button_text="Browse", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11942,11 +9113,6 @@ Parameter Descriptions: | str | tooltip | text, that will appear when mouse hovers over the element | | Tuple[int, int] | size | (w,h) w=characters-wide, h=rows-high | - - - - - ``` Help(button_text="Help", size=(None, None), @@ -11962,7 +9128,6 @@ Help(button_text="Help", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -11977,11 +9142,6 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - - - - ``` No(button_text="No", size=(None, None), @@ -11997,7 +9157,6 @@ No(button_text="No", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12011,11 +9170,6 @@ Parameter Descriptions: | (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | bind_return_key | (Default = False) :param focus: if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | - - - - - ``` OK(button_text="OK", size=(None, None), @@ -12031,7 +9185,6 @@ OK(button_text="OK", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12046,17 +9199,12 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - - - Dumps an Object's values as a formatted string. Very nicely done. Great way to display an object's member variables in human form ``` ObjToString(obj, extra=" ") ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12065,10 +9213,6 @@ Parameter Descriptions: | str | extra | (Default value = ' ') | | (str) | **RETURN** | Formatted output of the object's values - - - - Dumps an Object's values as a formatted string. Very nicely done. Great way to display an object's member variables in human form Returns only the top-most object's variables instead of drilling down to dispolay more @@ -12076,13 +9220,6 @@ Returns only the top-most object's variables instead of drilling down to dispola ObjToStringSingleObj(obj) ``` - - - - - - - ``` Ok(button_text="Ok", size=(None, None), @@ -12098,7 +9235,6 @@ Ok(button_text="Ok", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12113,11 +9249,6 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - - - - ``` Open(button_text="Open", size=(None, None), @@ -12133,7 +9264,6 @@ Open(button_text="Open", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12147,11 +9277,6 @@ Parameter Descriptions: | (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | - - - - - ``` Quit(button_text="Quit", size=(None, None), @@ -12167,7 +9292,6 @@ Quit(button_text="Quit", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12182,11 +9306,6 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - - - - ``` RButton(button_text, image_filename=None, @@ -12207,7 +9326,6 @@ RButton(button_text, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12222,11 +9340,6 @@ Parameter Descriptions: | (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | - - - - - ``` ReadButton(button_text, image_filename=None, @@ -12247,7 +9360,6 @@ ReadButton(button_text, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12262,11 +9374,6 @@ Parameter Descriptions: | (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | - - - - - ``` RealtimeButton(button_text, image_filename=None, @@ -12287,7 +9394,6 @@ RealtimeButton(button_text, metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12302,11 +9408,6 @@ Parameter Descriptions: | (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | bind_return_key | (Default = False) :param focus: if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | - - - - - ``` Save(button_text="Save", size=(None, None), @@ -12322,7 +9423,6 @@ Save(button_text="Save", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12337,11 +9437,6 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - - - - ``` SaveAs(button_text="Save As...", target=(555666777, -1), @@ -12360,7 +9455,6 @@ SaveAs(button_text="Save As...", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12375,10 +9469,6 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - - - Show a scrolled Popup window containing the user's text that was supplied. Use with as many items to print as you want, just like a print statement. @@ -12400,7 +9490,6 @@ ScrolledTextBox(args=*<1 or N object>, font=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12416,10 +9505,6 @@ Parameter Descriptions: | bool | non_blocking | if True the call will immediately return rather than waiting on user input | | Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X - - - - Sets the icon which will be used any time a window is created if an icon is not provided when the window is created. @@ -12427,13 +9512,6 @@ window is created. SetGlobalIcon(icon) ``` - - - - - - - ``` SetOptions(icon=None, button_color=None, @@ -12472,7 +9550,6 @@ SetOptions(icon=None, ttk_theme=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12507,11 +9584,6 @@ Parameter Descriptions: | bool | use_ttk_buttons | if True will cause all buttons to be ttk buttons | | str | ttk_theme | (str) Theme to use with ttk widgets. Choices (on Windows) include - 'default', 'winnative', 'clam', 'alt', 'classic', 'vista', 'xpnative' | - - - - - ``` Submit(button_text="Submit", size=(None, None), @@ -12527,7 +9599,6 @@ Submit(button_text="Submit", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12542,11 +9613,6 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - - - - ``` Yes(button_text="Yes", size=(None, None), @@ -12562,7 +9628,6 @@ Yes(button_text="Yes", metadata=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12577,14 +9642,8 @@ Parameter Descriptions: | Union[str, int, tuple] | key | key for uniquely identify this element (for window.FindElement) | | (Button) | **RETURN** | returns a button - - ## Debug Window Output - - - - Works like a "print" statement but with windowing options. Routes output to the "Debug Window" ``` @@ -12603,7 +9662,6 @@ easy_print(args=*<1 or N object>, background_color=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12623,22 +9681,12 @@ Parameter Descriptions: | Tuple[int, int] | location | Location of upper left corner of the window | | bool | do_not_reroute_stdout | do not reroute stdout | - - - - Close a previously opened EasyPrint window ``` easy_print_close() ``` - - - - - - Works like a "print" statement but with windowing options. Routes output to the "Debug Window" ``` @@ -12657,7 +9705,6 @@ eprint(args=*<1 or N object>, background_color=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12677,10 +9724,6 @@ Parameter Descriptions: | Tuple[int, int] | location | Location of upper left corner of the window | | bool | do_not_reroute_stdout | do not reroute stdout | - - - - Works like a "print" statement but with windowing options. Routes output to the "Debug Window" ``` @@ -12699,7 +9742,6 @@ sgprint(args=*<1 or N object>, background_color=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12719,22 +9761,12 @@ Parameter Descriptions: | Tuple[int, int] | location | Location of upper left corner of the window | | bool | do_not_reroute_stdout | do not reroute stdout | - - - - Close a previously opened EasyPrint window ``` sgprint_close() ``` - - - - - - Works like a "print" statement but with windowing options. Routes output to the "Debug Window" ``` @@ -12753,7 +9785,6 @@ EasyPrint(args=*<1 or N object>, background_color=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12773,22 +9804,12 @@ Parameter Descriptions: | Tuple[int, int] | location | Location of upper left corner of the window | | bool | do_not_reroute_stdout | do not reroute stdout | - - - - Close a previously opened EasyPrint window ``` EasyPrintClose() ``` - - - - - - Works like a "print" statement but with windowing options. Routes output to the "Debug Window" ``` @@ -12807,7 +9828,6 @@ Print(args=*<1 or N object>, background_color=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12827,27 +9847,14 @@ Parameter Descriptions: | Tuple[int, int] | location | Location of upper left corner of the window | | bool | do_not_reroute_stdout | do not reroute stdout | - - - - Close a previously opened EasyPrint window ``` PrintClose() ``` - - - - ## OneLineProgressMeter - - - - - ``` OneLineProgressMeter(title, current_value, @@ -12863,7 +9870,6 @@ OneLineProgressMeter(title, no_titlebar=False) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12882,28 +9888,18 @@ Parameter Descriptions: | bool | no_titlebar | If True: no titlebar will be shown on the window | | (bool) | **RETURN** | True if updated successfully. False if user closed the meter with the X or Cancel button - - - - Cancels and closes a previously created One Line Progress Meter window ``` OneLineProgressMeterCancel(key) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Any | key | Key used when meter was created | - - - - - ``` one_line_progress_meter(title, current_value, @@ -12919,7 +9915,6 @@ one_line_progress_meter(title, no_titlebar=False) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -12938,31 +9933,20 @@ Parameter Descriptions: | bool | no_titlebar | If True: no titlebar will be shown on the window | | (bool) | **RETURN** | True if updated successfully. False if user closed the meter with the X or Cancel button - - - - Cancels and closes a previously created One Line Progress Meter window ``` one_line_progress_meter_cancel(key) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Any | key | Key used when meter was created | - - ## Popup Functions - - - - Popup - Display a popup Window with as many parms as you wish to include. This is the GUI equivalent of the "print" statement. It's also great for "pausing" your program's flow until the user can read some error messages. @@ -12986,7 +9970,6 @@ Popup(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13009,10 +9992,6 @@ Parameter Descriptions: | Tuple[int, int] | location | Location on screen to display the top left corner of window. Defaults to window centered on screen | | Union[str, None] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X - - - - Show animation one frame at a time. This function has its own internal clocking meaning you can call it at any frequency and the rate the frames of video is shown remains constant. Maybe your frames update every 30 ms but your event loop is running every 10 ms. You don't have to worry about delaying, just call it every time through the @@ -13035,7 +10014,6 @@ PopupAnimated(image_source, icon=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13055,10 +10033,6 @@ Parameter Descriptions: | str | title | Title that will be shown on the window | | str | icon | Same as Window icon parameter. Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | - - - - Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` @@ -13079,7 +10053,6 @@ PopupAnnoying(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13100,10 +10073,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Popup that closes itself after some time period ``` @@ -13125,7 +10094,6 @@ PopupAutoClose(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13147,10 +10115,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Display Popup with "cancelled" button text ``` @@ -13171,7 +10135,6 @@ PopupCancel(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13192,10 +10155,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Popup with colored button and 'Error' as button text ``` @@ -13216,7 +10175,6 @@ PopupError(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13237,10 +10195,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Display popup window with text entry field and browse button so that a file can be chosen by user. ``` @@ -13265,7 +10219,6 @@ PopupGetFile(message, initial_folder=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13291,10 +10244,6 @@ Parameter Descriptions: | str | initial_folder | location in filesystem to begin browsing | | Union[str, None] | **RETURN** | string representing the file(s) chosen, None if cancelled or window closed with X - - - - Display popup with text entry field and browse button so that a folder can be chosen. ``` @@ -13315,7 +10264,6 @@ PopupGetFolder(message, initial_folder=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13337,10 +10285,6 @@ Parameter Descriptions: | str | initial_folder | location in filesystem to begin browsing | | Union[str, None] | **RETURN** | string representing the path chosen, None if cancelled or window closed with X - - - - Display Popup with text entry field. Returns the text entered or None if closed / cancelled ``` @@ -13360,7 +10304,6 @@ PopupGetText(message, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13381,10 +10324,6 @@ Parameter Descriptions: | Tuple[int, int] | location | (x,y) Location on screen to display the upper left corner of window | | Union[str, None] | **RETURN** | Text entered or None if window was closed or cancel button clicked - - - - Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` @@ -13405,7 +10344,6 @@ PopupNoBorder(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13426,10 +10364,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Show a Popup but without any buttons ``` @@ -13449,7 +10383,6 @@ PopupNoButtons(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13468,10 +10401,6 @@ Parameter Descriptions: | bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` @@ -13492,7 +10421,6 @@ PopupNoFrame(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13513,10 +10441,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` @@ -13537,7 +10461,6 @@ PopupNoTitlebar(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13558,10 +10481,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Show Popup window and immediately return (does not block) ``` @@ -13583,7 +10502,6 @@ PopupNoWait(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13604,10 +10522,6 @@ Parameter Descriptions: | bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Show Popup window and immediately return (does not block) ``` @@ -13629,7 +10543,6 @@ PopupNonBlocking(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13650,10 +10563,6 @@ Parameter Descriptions: | bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Display Popup with OK button only ``` @@ -13674,7 +10583,6 @@ PopupOK(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13695,10 +10603,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Display popup with OK and Cancel buttons ``` @@ -13719,7 +10623,6 @@ PopupOKCancel(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13741,10 +10644,6 @@ Parameter Descriptions: | Tuple[int, int] | location | Location of upper left corner of the window | | Union["OK", "Cancel", None] | **RETURN** | clicked button - - - - Show Popup box that doesn't block and closes itself ``` @@ -13766,7 +10665,6 @@ PopupQuick(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13787,10 +10685,6 @@ Parameter Descriptions: | bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Show Popup window with no titlebar, doesn't block, and auto closes itself. ``` @@ -13812,7 +10706,6 @@ PopupQuickMessage(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13833,10 +10726,6 @@ Parameter Descriptions: | bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Show a scrolled Popup window containing the user's text that was supplied. Use with as many items to print as you want, just like a print statement. @@ -13858,7 +10747,6 @@ PopupScrolled(args=*<1 or N object>, font=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13874,10 +10762,6 @@ Parameter Descriptions: | bool | non_blocking | if True the call will immediately return rather than waiting on user input | | Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X - - - - Popup that closes itself after some time period ``` @@ -13899,7 +10783,6 @@ PopupTimed(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13921,10 +10804,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Display Popup with Yes and No buttons ``` @@ -13945,7 +10824,6 @@ PopupYesNo(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -13967,14 +10845,8 @@ Parameter Descriptions: | Tuple[int, int] | location | Location of upper left corner of the window | | Union["Yes", "No", None] | **RETURN** | clicked button - - ## Popups PEP8 Versions - - - - Popup - Display a popup Window with as many parms as you wish to include. This is the GUI equivalent of the "print" statement. It's also great for "pausing" your program's flow until the user can read some error messages. @@ -13998,7 +10870,6 @@ popup(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14021,10 +10892,6 @@ Parameter Descriptions: | Tuple[int, int] | location | Location on screen to display the top left corner of window. Defaults to window centered on screen | | Union[str, None] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X - - - - Show animation one frame at a time. This function has its own internal clocking meaning you can call it at any frequency and the rate the frames of video is shown remains constant. Maybe your frames update every 30 ms but your event loop is running every 10 ms. You don't have to worry about delaying, just call it every time through the @@ -14047,7 +10914,6 @@ popup_animated(image_source, icon=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14067,10 +10933,6 @@ Parameter Descriptions: | str | title | Title that will be shown on the window | | str | icon | Same as Window icon parameter. Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | - - - - Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` @@ -14091,7 +10953,6 @@ popup_annoying(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14112,10 +10973,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Popup that closes itself after some time period ``` @@ -14137,7 +10994,6 @@ popup_auto_close(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14159,10 +11015,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Display Popup with "cancelled" button text ``` @@ -14183,7 +11035,6 @@ popup_cancel(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14204,10 +11055,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Popup with colored button and 'Error' as button text ``` @@ -14228,7 +11075,6 @@ popup_error(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14249,10 +11095,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Display a calendar window, get the user's choice, return as a tuple (mon, day, year) ``` @@ -14271,7 +11113,6 @@ popup_get_date(start_mon=None, day_abbreviations=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14286,10 +11127,6 @@ Parameter Descriptions: | List[str] | day_abbreviations | optional list of abbreviations to display as the day of week | | None or (int, int, int) | **RETURN** | Tuple containing (month, day, year) of chosen date or None if was cancelled - - - - Display popup window with text entry field and browse button so that a file can be chosen by user. ``` @@ -14314,7 +11151,6 @@ popup_get_file(message, initial_folder=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14340,10 +11176,6 @@ Parameter Descriptions: | str | initial_folder | location in filesystem to begin browsing | | Union[str, None] | **RETURN** | string representing the file(s) chosen, None if cancelled or window closed with X - - - - Display popup with text entry field and browse button so that a folder can be chosen. ``` @@ -14364,7 +11196,6 @@ popup_get_folder(message, initial_folder=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14386,10 +11217,6 @@ Parameter Descriptions: | str | initial_folder | location in filesystem to begin browsing | | Union[str, None] | **RETURN** | string representing the path chosen, None if cancelled or window closed with X - - - - Display Popup with text entry field. Returns the text entered or None if closed / cancelled ``` @@ -14409,7 +11236,6 @@ popup_get_text(message, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14430,10 +11256,6 @@ Parameter Descriptions: | Tuple[int, int] | location | (x,y) Location on screen to display the upper left corner of window | | Union[str, None] | **RETURN** | Text entered or None if window was closed or cancel button clicked - - - - Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` @@ -14454,7 +11276,6 @@ popup_no_border(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14475,10 +11296,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Show a Popup but without any buttons ``` @@ -14498,7 +11315,6 @@ popup_no_buttons(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14517,10 +11333,6 @@ Parameter Descriptions: | bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` @@ -14541,7 +11353,6 @@ popup_no_frame(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14562,10 +11373,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` @@ -14586,7 +11393,6 @@ popup_no_titlebar(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14607,10 +11413,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Show Popup window and immediately return (does not block) ``` @@ -14632,7 +11434,6 @@ popup_no_wait(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14653,10 +11454,6 @@ Parameter Descriptions: | bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Show Popup window and immediately return (does not block) ``` @@ -14678,7 +11475,6 @@ popup_non_blocking(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14699,10 +11495,6 @@ Parameter Descriptions: | bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Displays a "notification window", usually in the bottom right corner of your display. Has an icon, a title, and a message. It is more like a "toaster" window than the normal popups. The window will slowly fade in and out if desired. Clicking on the window will cause it to move through the end the current "phase". For example, if the window was fading in and it was clicked, then it would immediately stop fading in and instead be fully visible. It's a way for the user to quickly dismiss the window. @@ -14719,7 +11511,6 @@ popup_notify(args=*<1 or N object>, location=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14733,10 +11524,6 @@ Parameter Descriptions: | Tuple[int, int] | location | Location on the screen to display the window | | (int) | **RETURN** | reason for returning - - - - Display Popup with OK button only ``` @@ -14757,7 +11544,6 @@ popup_ok(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14778,10 +11564,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Display popup with OK and Cancel buttons ``` @@ -14802,7 +11584,6 @@ popup_ok_cancel(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14824,10 +11605,6 @@ Parameter Descriptions: | Tuple[int, int] | location | Location of upper left corner of the window | | Union["OK", "Cancel", None] | **RETURN** | clicked button - - - - Show Popup box that doesn't block and closes itself ``` @@ -14849,7 +11626,6 @@ popup_quick(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14870,10 +11646,6 @@ Parameter Descriptions: | bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Show Popup window with no titlebar, doesn't block, and auto closes itself. ``` @@ -14895,7 +11667,6 @@ popup_quick_message(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14916,10 +11687,6 @@ Parameter Descriptions: | bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Show a scrolled Popup window containing the user's text that was supplied. Use with as many items to print as you want, just like a print statement. @@ -14941,7 +11708,6 @@ popup_scrolled(args=*<1 or N object>, font=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -14957,10 +11723,6 @@ Parameter Descriptions: | bool | non_blocking | if True the call will immediately return rather than waiting on user input | | Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X - - - - Popup that closes itself after some time period ``` @@ -14982,7 +11744,6 @@ popup_timed(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -15004,10 +11765,6 @@ Parameter Descriptions: | bool | keep_on_top | If True the window will remain above all current windows | | Tuple[int, int] | location | Location of upper left corner of the window | - - - - Display Popup with Yes and No buttons ``` @@ -15028,7 +11785,6 @@ popup_yes_no(args=*<1 or N object>, location=(None, None)) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -15050,22 +11806,14 @@ Parameter Descriptions: | Tuple[int, int] | location | Location of upper left corner of the window | | Union["Yes", "No", None] | **RETURN** | clicked button - - ## PEP8 Function Bindings - - - - - Fills a window with values provided in a values dictionary { element_key : new_value } ``` fill_form_with_values(window, values_dict) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -15073,29 +11821,18 @@ Parameter Descriptions: | Window | window | The window object to fill | | (Dict[Any:Any]) | values_dict | A dictionary with element keys as key and value is values parm for Update call | - - - - The PySimpleGUI "Test Harness". This is meant to be a super-quick test of the Elements. ``` main() ``` - - - - - - Dumps an Object's values as a formatted string. Very nicely done. Great way to display an object's member variables in human form ``` obj_to_string(obj, extra=" ") ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -15104,10 +11841,6 @@ Parameter Descriptions: | str | extra | (Default value = ' ') | | (str) | **RETURN** | Formatted output of the object's values - - - - Dumps an Object's values as a formatted string. Very nicely done. Great way to display an object's member variables in human form Returns only the top-most object's variables instead of drilling down to dispolay more @@ -15115,12 +11848,6 @@ Returns only the top-most object's variables instead of drilling down to dispola obj_to_string_single_obj(obj) ``` - - - - - - Sets the icon which will be used any time a window is created if an icon is not provided when the window is created. @@ -15128,13 +11855,6 @@ window is created. set_global_icon(icon) ``` - - - - - - - ``` set_options(icon=None, button_color=None, @@ -15173,7 +11893,6 @@ set_options(icon=None, ttk_theme=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -15208,39 +11927,24 @@ Parameter Descriptions: | bool | use_ttk_buttons | if True will cause all buttons to be ttk buttons | | str | ttk_theme | (str) Theme to use with ttk widgets. Choices (on Windows) include - 'default', 'winnative', 'clam', 'alt', 'classic', 'vista', 'xpnative' | - - - - Shows the smaller "popout" window. Default location is the upper right corner of your screen ``` show_debugger_popout_window(location=(None, None), args=*<1 or N object>) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | Tuple[int, int] | location | Locations (x,y) on the screen to place upper left corner of the window | - - - - Shows the large main debugger window ``` show_debugger_window(location=(None, None), args=*<1 or N object>) ``` - - - - - - Show a scrolled Popup window containing the user's text that was supplied. Use with as many items to print as you want, just like a print statement. @@ -15262,7 +11966,6 @@ sprint(args=*<1 or N object>, font=None) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -15278,26 +11981,14 @@ Parameter Descriptions: | bool | non_blocking | if True the call will immediately return rather than waiting on user input | | Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X - - - - The PySimpleGUI "Test Harness". This is meant to be a super-quick test of the Elements. ``` test() ``` - - - - ## Themes - - - - Sets / Gets the current Theme. If none is specified then returns the current theme. This call replaces the ChangeLookAndFeel / change_look_and_feel call which only sets the theme. @@ -15305,13 +11996,6 @@ This call replaces the ChangeLookAndFeel / change_look_and_feel call which only theme(new_theme=None) -> (str) the currently selected theme ``` - - - - - - - Sets/Returns the background color currently in use Used for Windows and containers (Column, Frame, Tab) and tables @@ -15319,13 +12003,6 @@ Used for Windows and containers (Column, Frame, Tab) and tables theme_background_color(color=None) -> (str) - color string of the background color currently in use ``` - - - - - - - Sets/Returns the border width currently in use Used by non ttk elements at the moment @@ -15333,185 +12010,86 @@ Used by non ttk elements at the moment theme_border_width(border_width=None) -> (int) - border width currently in use ``` - - - - - - - Sets/Returns the button color currently in use ``` theme_button_color(color=None) -> Tuple[str, str] - TUPLE with color strings of the button color currently in use (button text color, button background color) ``` - - - - - - - Sets/Returns the background color currently in use for all elements except containers ``` theme_element_background_color(color=None) -> (str) - color string of the element background color currently in use ``` - - - - - - - Sets/Returns the text color used by elements that have text as part of their display (Tables, Trees and Sliders) ``` theme_element_text_color(color=None) -> (str) - color string currently in use ``` - - - - - - - Sets/Returns the input element background color currently in use ``` theme_input_background_color(color=None) -> (str) - color string of the input element background color currently in use ``` - - - - - - - Sets/Returns the input element entry color (not the text but the thing that's displaying the text) ``` theme_input_text_color(color=None) -> (str) - color string of the input element color currently in use ``` - - - - - - - Returns a sorted list of the currently available color themes ``` theme_list() -> List[str] - A sorted list of the currently available color themes ``` - - - - - - - Show a window with all of the color themes - takes a while so be patient ``` theme_previewer(columns=12) ``` - - - - - - Sets/Returns the progress meter border width currently in use ``` theme_progress_bar_border_width(border_width=None) -> (int) - border width currently in use ``` - - - - - - - Sets/Returns the progress bar colors by the current color theme ``` theme_progress_bar_color(color=None) -> Tuple[str, str] - TUPLE with color strings of the ProgressBar color currently in use(button text color, button background color) ``` - - - - - - - Sets/Returns the slider border width currently in use ``` theme_slider_border_width(border_width=None) -> (int) - border width currently in use ``` - - - - - - - Sets/Returns the slider color (used for sliders) ``` theme_slider_color(color=None) -> (str) - color string of the slider color currently in use ``` - - - - - - - Sets/Returns the text color currently in use ``` theme_text_color(color=None) -> (str) - color string of the text color currently in use ``` - - - - - - - Sets/Returns the background color for text elements ``` theme_text_element_background_color(color=None) -> (str) - color string of the text background color currently in use ``` - - - - - ## Old Themes (Look and Feel) - Replaced by theme() - - - - Change the "color scheme" of all future PySimpleGUI Windows. The scheme are string names that specify a group of colors. Background colors, text colors, button colors. There are 13 different color settings that are changed at one time using a single call to ChangeLookAndFeel @@ -15529,7 +12107,6 @@ Default1 = The full system default including the button (everything's gray... ho ChangeLookAndFeel(index, force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| @@ -15537,23 +12114,12 @@ Parameter Descriptions: | str | index | the name of the index into the Look and Feel table (does not have to be exact, can be "fuzzy") | | bool | force | no longer used | - - - - Get a list of the valid values to pass into your call to change_look_and_feel ``` ListOfLookAndFeelValues() -> List[str] - list of valid string values ``` - - - - - - - Displays a "Quick Reference Window" showing all of the different Look and Feel settings that are available. They are sorted alphabetically. The legacy color names are mixed in, but otherwise they are sorted into Dark and Light halves @@ -15561,25 +12127,12 @@ They are sorted alphabetically. The legacy color names are mixed in, but otherw preview_all_look_and_feel_themes(columns=12) ``` - - - - - - Get a list of the valid values to pass into your call to change_look_and_feel ``` list_of_look_and_feel_values() -> List[str] - list of valid string values ``` - - - - - - - Change the "color scheme" of all future PySimpleGUI Windows. The scheme are string names that specify a group of colors. Background colors, text colors, button colors. There are 13 different color settings that are changed at one time using a single call to ChangeLookAndFeel @@ -15597,12 +12150,9 @@ Default1 = The full system default including the button (everything's gray... ho change_look_and_feel(index, force=False) ``` - Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | index | the name of the index into the Look and Feel table (does not have to be exact, can be "fuzzy") | -| bool | force | no longer used | - - +| bool | force | no longer used | \ No newline at end of file