diff --git a/readme_creator/1_HEADER_top_part.md b/readme_creator/1_HEADER_top_part.md index 246903fe..35467db8 100644 --- a/readme_creator/1_HEADER_top_part.md +++ b/readme_creator/1_HEADER_top_part.md @@ -38,7 +38,7 @@ HOW DO I INSERT IMAGES ??? ![Awesome Meter](https://img.shields.io/badge/Awesome_meter-100-yellow.svg) ![Python Version](https://img.shields.io/badge/Python-2.7_3.x-yellow.svg) -![Python Version](https://img.shields.io/badge/PySimpleGUI_For_Python_3.x_Version-4.5.0-red.svg?longCache=true&style=for-the-badge) +![Python Version](https://img.shields.io/badge/PySimpleGUI_For_Python_3.x_Version-4.6.0-red.svg?longCache=true&style=for-the-badge) ![Python Version](https://img.shields.io/badge/PySimpleGUI_For_Python_2.7_Version-2.4.1-blue.svg?longCache=true&style=for-the-badge) ![Python Version](https://img.shields.io/badge/PySimpleGUIQt_Version-0.28.0-orange.svg?longCache=true&style=for-the-badge) @@ -69,6 +69,8 @@ pip3 install pysimplegui ```python import PySimpleGUI as sg + +sg.change_look_and_feel('DarkAmber') # Add a touch of color # All the stuff inside your window. layout = [ [sg.Text('Some text on Row 1')], [sg.Text('Enter something on Row 2'), sg.InputText()], @@ -90,7 +92,9 @@ window.close() and returns the value input as well as the button clicked. -![image](https://user-images.githubusercontent.com/13696193/61077153-cdfc0b00-a3eb-11e9-9e93-d6ec2ffb442a.png) +![image](https://user-images.githubusercontent.com/46163555/68713283-7cb38200-056b-11ea-990a-aa1603af5a11.png) + + ### Any Questions? It's that simple. @@ -106,7 +110,6 @@ and returns the value input as well as the button clicked. * sitting on a Raspberry **Pi** with a touchscreen that's going to waste because you don't have the time to learn a GUI SDK? * into Machine Learning and are sick of the command line? * an IT guy/gal that has written some cool tools but due to corporate policies are unable to share unless an EXE file? -* wanting to distribute your Python code to Windows users as a single .EXE file that launches straight into a GUI, much like a WinForms app? * want to share your program with your friends or families (that aren't so freakish that they have Python running) * wanting to run a program in your system tray? * a teacher wanting to teach your students how to program using a GUI? @@ -141,9 +144,10 @@ and returns the value input as well as the button clicked. #### July-2019 Note - This readme is being generated from the PySimpleGUI.py file located on GitHub. As a result, some of the calls or parameters may not match the PySimpleGUI that you pip installed. -## GUI Development does not have to be difficult nor painful. It can be FUN +## GUI Development does not have to be difficult nor painful. It can be (and is) FUN #### What users are saying about PySimpleGUI + ***(None of these comments were solicited & are not paid endorsements - other than a huge thank you they received!)*** "I've been working to learn PyQT for the past week in my off time as an intro to GUI design and how to apply it to my existing scripts... Took me ~30 minutes to figure out PySimpleGUI and get my scripts working with a GUI." @@ -162,7 +166,7 @@ and returns the value input as well as the button clicked. "I love PySimpleGUI! I've been teaching it in my Python classes instead of Tkinter." - +"I wish PySimpleGUI was available for every friggin programming language" ### START HERE - User Manual with Table of Contents @@ -184,7 +188,7 @@ and returns the value input as well as the button clicked. [Repl.it Home for PySimpleGUI](https://repl.it/@PySimpleGUI) -[Lots of screenshots](https://github.com/PySimpleGUI/PySimpleGUI/issues/1) +[Lots of screenshots](https://www.bountysource.com/issues/60766522-screen-shots) [How to submit an Issue](https://github.com/PySimpleGUI/PySimpleGUI/issues/1646) @@ -304,6 +308,7 @@ This makes the coding process extremely quick and the amount of code very small ```python import PySimpleGUI as sg +sg.change_look_and_feel('DarkAmber') # Add a little color to your windows # All the stuff inside your window. This is the PSG magic code compactor... layout = [ [sg.Text('Some text on Row 1')], [sg.Text('Enter something on Row 2'), sg.InputText()], @@ -313,14 +318,16 @@ layout = [ [sg.Text('Some text on Row 1')], window = sg.Window('Window Title', layout) # Event Loop to process "events" while True: - event, values = window.Read() + event, values = window.read() if event in (None, 'Cancel'): break -window.Close() +window.close() ``` -![image](https://user-images.githubusercontent.com/13696193/61077153-cdfc0b00-a3eb-11e9-9e93-d6ec2ffb442a.png) +![image](https://user-images.githubusercontent.com/46163555/68713283-7cb38200-056b-11ea-990a-aa1603af5a11.png) + + You gotta admit that the code above is a lot more "fun" looking that tkinter code you've studied before. Adding stuff to your GUI is ***trivial***. You can clearly see the "mapping" of those 3 lines of code to specific Elements laid out in a Window. It's not a trick. It's how easy it is to code in PySimpleGUI. With this simple concept comes the ability to create any window layout you wish. There are parameters to move elements around inside the window should you need more control. @@ -841,6 +848,13 @@ Your program have 2 or 3 windows and you're concerned? Below you'll see 11 wind ![pyplot 1](https://user-images.githubusercontent.com/13696193/44683336-11d46480-aa14-11e8-9d6c-f656796fc915.jpg) +Just because you can't match a pair of socks doesn't mean your windows have to all look the same gray color. Choose from over 100 different "Themes". Add 1 line call to `change_look_and_feel` to instantly transform your window from gray to something more visually pleasing to interact with. If you mispell the theme name badly or specify a theme name is is missing from the table of allowed names, then a theme will be randomly assigned for you. Who knows, maybe the theme chosen you'll like and want to use instead of your original plan. + +In PySimpleGUI release 4.6 the number of themes was dramatically increased from a couple dozen to over 100. To use the color schemes shown in the window below, add a call to `change_look_and_feel('Theme Name)` to your code, passing in the name of thd desired color theme. To see this window and the list of available themes on your releeae of softrware, call the function `preview_all_look_and_feel_themes()`. This will create a window with the frames like those below. It will shows you exactly what's available in your version of PySimpleGUI. + +![Nov 2019 Look and Feel Themes](https://user-images.githubusercontent.com/46163555/68987669-91a54500-07f9-11ea-921e-8bf9320e3156.png) + + Make beautiful looking, alpha-blended (partially transparent) Rainmeter-style Desktop Widgets that run in the background. ![cpu cores dashboard 2](https://user-images.githubusercontent.com/13696193/47611749-18964c80-da42-11e8-93c4-6821a6fce488.gif) diff --git a/readme_creator/2_readme.md b/readme_creator/2_readme.md index 4ba29076..73b3beb0 100644 --- a/readme_creator/2_readme.md +++ b/readme_creator/2_readme.md @@ -504,7 +504,7 @@ This example introduces the concept of "keys". Keys are super important in PySi ```python import PySimpleGUI as sg -layout = [[sg.Text('Your typed chars appear here:'), sg.Text('', key='_OUTPUT_')], +layout = [[sg.Text('Your typed chars appear here:'), sg.Text('', size=(12,1), key='_OUTPUT_')], [sg.Input(key='_IN_')], [sg.Button('Show'), sg.Button('Exit')]] @@ -2504,7 +2504,7 @@ window = sg.Window('Frame with buttons', layout, font=("Helvetica", 12)) In my opinion, the tkinter Canvas Widget is the most powerful of the tkinter widget. While I try my best to completely isolate the user from anything that is tkinter related, the Canvas Element is the one exception. It enables integration with a number of other packages, often with spectacular results. -However, there's another way to get that power and that's through the Graph Element, an even MORE powerful Element as it uses a Canvas that you can directly access if needed. The Graph Element has a large number of drawing methods that the Canvas Element does not have. +However, there's another way to get that power and that's through the Graph Element, an even MORE powerful Element as it uses a Canvas that you can directly access if needed. The Graph Element has a large number of drawing methods that the Canvas Element does not have. Plus, if you need to, you can access the Graph Element's "Canvas" through a member variable. ### Matplotlib, Pyplot Integration @@ -3556,7 +3556,7 @@ while True: layout2 = [[sg.Text('Window 2')], [sg.Button('Exit')]] - win2 = sg.Window('Window 2', layout) + win2 = sg.Window('Window 2', layout2) if win2_active: ev2, vals2 = win2.Read(timeout=100) @@ -3592,7 +3592,7 @@ while True: layout2 = [[sg.Text('Window 2')], # note must create a layout from scratch every time. No reuse [sg.Button('Exit')]] - win2 = sg.Window('Window 2', layout) + win2 = sg.Window('Window 2', layout2) while True: ev2, vals2 = win2.Read() if ev2 is None or ev2 == 'Exit': @@ -4048,1324 +4048,2265 @@ This section of the documentation is generated directly from the source code. A Without further delay... here are all of the Elements and the Window class - - -### Button Element +## Button Element -#### ButtonCallBack +### ButtonCallBack -#### ButtonPressCallBack +### ButtonPressCallBack -#### ButtonReboundCallback +### ButtonReboundCallback -#### ButtonReleaseCallBack +### ButtonReleaseCallBack -#### Click +### Click -#### GetText +### GetText -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### click +### button_rebound_callback + + + +### click -#### expand +### expand -#### update +### get_size + + + +### get_text + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### ButtonMenu Element +## ButtonMenu Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### Click +### Click -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### button_rebound_callback + + + +### expand -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### Canvas Element +## Canvas Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### TKCanvas +### TKCanvas -#### expand +### button_rebound_callback + + + +### expand -### Checkbox Element +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### tk_canvas + + + +### unhide_row + + + +## Checkbox Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### Get +### Get -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### button_rebound_callback + + + +### expand -#### get +### get -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### Column Element +## Column Element -#### AddRow +### AddRow -#### ButtonReboundCallback +### ButtonReboundCallback -#### Layout +### Layout -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### add_row + + + +### button_rebound_callback + + + +### expand -#### layout +### get_size + + + +### hide_row + + + +### layout -#### update +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### Combo Element +## Combo Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### Get +### Get -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### button_rebound_callback + + + +### expand -#### get +### get -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update - -### ErrorElement Element - - - - -#### ButtonReboundCallback - - - -#### Get - - - -#### SetFocus - - - -#### SetTooltip - - - -#### Update - - - -#### expand - - - -#### get - - - -#### update - - - -### Frame Element +## Frame Element -#### AddRow +### AddRow -#### ButtonReboundCallback +### ButtonReboundCallback -#### Layout +### Layout -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### add_row + + + +### button_rebound_callback + + + +### expand -#### layout +### get_size + + + +### hide_row + + + +### layout -#### update +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### Graph Element +## Graph Element -#### BringFigureToFront +### BringFigureToFront -#### ButtonPressCallBack +### ButtonPressCallBack -#### ButtonReboundCallback +### ButtonReboundCallback -#### ButtonReleaseCallBack +### ButtonReleaseCallBack -#### DeleteFigure +### DeleteFigure -#### DrawArc +### DrawArc -#### DrawCircle +### DrawCircle -#### DrawImage +### DrawImage -#### DrawLine +### DrawLine -#### DrawOval +### DrawOval -#### DrawPoint +### DrawPoint -#### DrawRectangle +### DrawRectangle -#### DrawText +### DrawText -#### Erase +### Erase -#### MotionCallBack +### MotionCallBack -#### Move +### Move -#### MoveFigure +### MoveFigure -#### RelocateFigure +### RelocateFigure -#### SendFigureToBack +### SendFigureToBack -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### TKCanvas +### TKCanvas -#### Update +### Update -#### erase +### bring_figure_to_front + + + +### button_press_call_back + + + +### button_rebound_callback + + + +### button_release_call_back + + + +### delete_figure + + + +### draw_arc + + + +### draw_circle + + + +### draw_image + + + +### draw_line + + + +### draw_oval + + + +### draw_point + + + +### draw_rectangle + + + +### draw_text + + + +### erase -#### expand +### expand -#### move +### get_size + + + +### hide_row + + + +### motion_call_back + + + +### move -#### update +### move_figure + + + +### relocate_figure + + + +### send_figure_to_back + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### tk_canvas + + + +### unhide_row + + + +### update -### Image Element +## Image Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### UpdateAnimation +### UpdateAnimation -#### expand +### button_rebound_callback + + + +### expand -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### InputText Element +### update_animation + + + +## InputText Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### Get +### Get -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### button_rebound_callback + + + +### expand -#### get +### get -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### Listbox Element +## Listbox Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### GetIndexes +### GetIndexes -#### GetListValues +### GetListValues -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### SetValue +### SetValue -#### Update +### Update -#### expand +### button_rebound_callback + + + +### expand -#### update +### get_indexes + + + +### get_list_values + + + +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### set_value + + + +### unhide_row + + + +### update -### Menu Element +## Menu Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### button_rebound_callback + + + +### expand -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### Multiline Element +## Multiline Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### Get +### Get -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### button_rebound_callback + + + +### expand -#### get +### get -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### OptionMenu Element +## OptionMenu Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### button_rebound_callback + + + +### expand -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### Output Element +## Output Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### Get +### Get -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip +### TKOut -#### Update + + +### Update -#### expand +### button_rebound_callback + + + +### expand -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### tk_out + + + +### unhide_row + + + +### update -### Pane Element +## Pane Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### button_rebound_callback + + + +### expand -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### ProgressBar Element +## ProgressBar Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### UpdateBar +### UpdateBar -#### expand +### button_rebound_callback + + + +### expand -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### Radio Element +### update_bar + + + +## Radio Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### Get +### Get -#### ResetGroup +### ResetGroup -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### button_rebound_callback + + + +### expand -#### get +### get -#### update +### get_size + + + +### hide_row + + + +### reset_group + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### Slider Element +## Slider Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### button_rebound_callback + + + +### expand -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### Spin Element +## Spin Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### Get +### Get -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### button_rebound_callback + + + +### expand -#### get +### get -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### StatusBar Element +## StatusBar Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### button_rebound_callback + + + +### expand -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### Tab Element +## Tab Element -#### AddRow +### AddRow -#### ButtonReboundCallback +### ButtonReboundCallback -#### Layout +### Layout -#### Select +### Select -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### add_row + + + +### button_rebound_callback + + + +### expand -#### layout +### get_size + + + +### hide_row + + + +### layout -#### select +### select -#### update +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### TabGroup Element +## TabGroup Element -#### AddRow +### AddRow -#### ButtonReboundCallback +### ButtonReboundCallback -#### FindKeyFromTabName +### FindKeyFromTabName -#### Get +### Get -#### Layout +### Layout -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### expand +### add_row + + + +### button_rebound_callback + + + +### expand -#### get +### find_key_from_tab_name + + + +### get -#### layout +### get_size + + + +### hide_row + + + +### layout -### Table Element +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +## Table Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### Get +### Get -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### button_rebound_callback + + + +### expand -#### get +### get -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### treeview_double_click + + + +### treeview_selected + + + +### unhide_row + + + +### update -### Text Element +## Text Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### button_rebound_callback + + + +### expand -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +### update -### Tree Element +## Tree Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### Update +### Update -#### expand +### add_treeview_data + + + +### button_rebound_callback + + + +### expand -#### update +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### treeview_selected + + + +### unhide_row + + + +### update -### TreeData Element +## TreeData Element -#### Insert +### Insert +### Node -### VerticalSeparator Element + + +### insert + + + +## VerticalSeparator Element -#### ButtonReboundCallback +### ButtonReboundCallback -#### SetFocus +### SetFocus -#### SetTooltip +### SetTooltip -#### expand +### button_rebound_callback + + + +### expand -### Window +### get_size + + + +### hide_row + + + +### set_focus + + + +### set_size + + + +### set_tooltip + + + +### unhide_row + + + +## Window -#### AddRow +### AddRow -#### AddRows +### AddRows -#### AlphaChannel +### AlphaChannel -#### BringToFront +### BringToFront -#### Close +### Close - -#### CurrentLocation +### CurrentLocation -#### Disable +### Disable -#### DisableDebugger +### DisableDebugger -#### Disappear +### Disappear -#### Elem +### Elem -#### Element +### Element -#### Enable +### Enable -#### EnableDebugger +### EnableDebugger -#### Fill +### Fill -#### Finalize +### Finalize -#### Find +### Find -#### FindElement +### FindElement -#### FindElementWithFocus +### FindElementWithFocus - -#### GetScreenDimensions +### GetScreenDimensions -#### GrabAnyWhereOff +### GrabAnyWhereOff -#### GrabAnyWhereOn +### GrabAnyWhereOn -#### Hide +### Hide - -#### Layout +### Layout -#### LoadFromDisk +### LoadFromDisk -#### Maximize +### Maximize -#### Minimize +### Minimize -#### Move +### Move -#### Normal +### Normal - -#### Read +### Read -#### Reappear +### Reappear -#### Refresh +### Refresh -#### SaveToDisk +### SaveToDisk -#### SetAlpha +### SetAlpha -#### SetIcon +### SetIcon -#### SetTransparentColor +### SetTransparentColor -#### Size - -Note the `Window.Size` can be used for both reading and writing +### Size -#### UnHide +### UnHide -#### VisibilityChanged +### VisibilityChanged -#### close +### add_row + + + +### add_rows + + + +### alpha_channel + + + +### bring_to_front + + + +### close -#### disable +### current_location + + + +### disable -#### disappear +### disable_debugger + + + +### disappear -#### elem +### elem -#### element +### element -#### enable +### enable -#### fill +### enable_debugger + + + +### fill -#### finalize +### finalize -#### find +### find -#### hide +### find_element + + + +### find_element_with_focus + + + +### get_screen_dimensions + + + +### get_screen_size + + + +### grab_any_where_off + + + +### grab_any_where_on + + + +### hide -#### layout +### layout -#### maximize +### load_from_disk + + + +### maximize -#### minimize +### minimize -#### move +### move -#### normal +### normal -#### read +### read -#### reappear +### reappear -#### refresh +### refresh -#### size +### save_to_disk + + + +### set_alpha + + + +### set_icon + + + +### set_transparent_color + + + +### size +### un_hide + + + +### visibility_changed + + + + diff --git a/readme_creator/4_Release_notes.md b/readme_creator/4_Release_notes.md index 59df551e..29896379 100644 --- a/readme_creator/4_Release_notes.md +++ b/readme_creator/4_Release_notes.md @@ -834,7 +834,31 @@ Let's hope it doesn't all blow up in our faces! * Fix in popup_get_files when 0 length of filename * Fix in Window.SetIcon - properly sets icon using file with Linux now. Was always defaulting +## 4.6 PySimpleGUI 16-Nov-2019 + +* Themes!!! +* Added a LOT of Look and Feel themes. Total < 100 now +* Doctring comments for some missing functions +* PEP8 bindings for button_rebound_collback, set_tooltip, set_focus +* Spin Element Update - shortened code +* Allow tk.PhotoImage objeft to be passed into Image.update as the data +* DrawRectangle - added line_width parameter. Defaults to 1 +* Fix for Slider - was only setting the trough color if the background color was being set_focus +* Added a deiconify call to Window.Normal so it can be used to restore a window that has been minimized. Not working on Linux +* Combo - Fix for not allowing a "0" to be specified as the default +* Table - Saving the Frame that contains a table in the member variable table_frame. This will enable the frame to be changed to expandable in the future so that the table can be resized as a window expands. +* LOTS AND LOTS of Look and Feel themes!!!! +* Added SystemDefaultForReal to look and feel that will prodce 100% not styled windows +* Changed the "gray" strings in look and feel table into RGB strtings (e.g. gray25 = #404040). No all graphics subsystems +* Removed Mac restriction from Look and Feel setting changes. All color settings are changed EXCEPT for the button color now on a Mac +* "Fuzzy Logic" Look and Feel Theme Selection - No longer have to memorize every character and get the case right. Now can get "close enough" and it'll working +* New function - preview_all_look_and_feel_themes. Causes a window to be shown that shows all of the currently available look and feel themes +* Removed use of CloseButton in popup get file, folder, text. Was causing problems where input fields stopped working. See bug on GitHub + + + ### Upcoming + Make suggestions people! Future release features diff --git a/readme_creator/PySimpleGUIlib.py b/readme_creator/PySimpleGUIlib.py index a4bf3779..59b9e04a 100644 --- a/readme_creator/PySimpleGUIlib.py +++ b/readme_creator/PySimpleGUIlib.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -version = __version__ = "4.5.0.0.1 The ALMOST Released but still un-released version 04-Nov-2019" +version = __version__ = "4.6.0 Released 11-Nov-2019" # 888888ba .d88888b oo dP .88888. dP dP dP @@ -805,6 +805,10 @@ class Element(): def hide_row(self): + """ + 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 + """ try: self.ParentRowFrame.pack_forget() except: @@ -812,6 +816,10 @@ class Element(): def unhide_row(self): + """ + 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. + """ try: self.ParentRowFrame.pack() except: @@ -853,6 +861,10 @@ class Element(): """ return self.Update(*args, **kwargs) + button_rebound_callback = ButtonReboundCallback + set_tooltip = SetTooltip + set_focus = SetFocus + # ---------------------------------------------------------------------- # # Input Class # @@ -1582,15 +1594,18 @@ class Spin(Element): except: pass self.DefaultValue = value - if disabled == True: - self.TKSpinBox.configure(state='disabled') - elif disabled == False: - self.TKSpinBox.configure(state='normal') + if disabled is not None: + self.TKSpinBox.configure(state='disabled' if disabled else 'normal') + # if disabled == True: + # self.TKSpinBox.configure(state='disabled') + # elif disabled == False: + # self.TKSpinBox.configure(state='normal') if visible is False: self.TKSpinBox.pack_forget() elif visible is True: self.TKSpinBox.pack() + def _SpinChangedHandler(self, event): """ Callback function. Used internally only. Called by tkinter when Spinbox Widget changes. Results in Window.Read() call returning @@ -2727,11 +2742,12 @@ class Image(Element): Changes some of the settings for the Image Element. Must call `Window.Read` or `Window.Finalize` prior :param filename: (str) filename to the new image to display. - :param data: (str) Base64 encoded string + :param data: Union[str, tkPhotoImage] Base64 encoded string OR a tk.PhotoImage object :param size: Tuple[int,int] size of a image (w,h) w=characters-wide, h=rows-high :param visible: (bool) control visibility of element """ + image = None if self.Widget is None: warnings.warn('You cannot Update element with key = {} until the window has been Read or Finalized'.format(self.Key), UserWarning) return @@ -2741,16 +2757,18 @@ class Image(Element): # if type(data) is bytes: try: image = tk.PhotoImage(data=data) - except: - return # an error likely means the window has closed so exit + except Exception as e: + image = data + # return # an error likely means the window has closed so exit else: return - width, height = size[0] or image.width(), size[1] or image.height() - try: # sometimes crashes if user closed with X - self.tktext_label.configure(image=image, width=width, height=height) - except: - pass - self.tktext_label.image = image + if image is not None: + width, height = size[0] or image.width(), size[1] or image.height() + try: # sometimes crashes if user closed with X + self.tktext_label.configure(image=image, width=width, height=height) + except: + pass + self.tktext_label.image = image if visible is False: self.tktext_label.pack_forget() elif visible is True: @@ -3067,7 +3085,7 @@ class Graph(Element): id = None return id - def DrawRectangle(self, top_left, bottom_right, fill_color=None, line_color=None): + def DrawRectangle(self, top_left, bottom_right, fill_color=None, line_color=None, line_width=None): """ Draw a rectangle given 2 points. Can control the line and fill colors @@ -3084,10 +3102,12 @@ class Graph(Element): print('*** WARNING - The Graph element has not been finalized and cannot be drawn upon ***') print('Call Window.Finalize() prior to this operation') return None + if line_width is None: + line_width = 1 try: # in case closed with X id = self._TKCanvas2.create_rectangle(converted_top_left[0], converted_top_left[1], converted_bottom_right[0], - converted_bottom_right[1], fill=fill_color, outline=line_color) + converted_bottom_right[1], fill=fill_color, outline=line_color, width=line_width) except: id = None return id @@ -3841,6 +3861,7 @@ class Slider(Element): self.Disabled = disabled self.TickInterval = tick_interval self.DisableNumericDisplay = disable_number_display + self.TroughColor = DEFAULT_SCROLLBAR_COLOR temp_size = size if temp_size == (None, None): temp_size = (20, 20) if self.Orientation.startswith('h') else (8, 20) @@ -5314,6 +5335,11 @@ class Window: @classmethod def get_screen_size(self): + """ + 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. + + :return: Tuple[int, int] - Size of the screen in pixels as determined by tkinter + """ root = tk.Tk() screen_width = root.winfo_screenwidth() # get window info to move to middle of screen screen_height = root.winfo_screenheight() @@ -5956,10 +5982,13 @@ class Window: """ Restore a window to a non-maximized state. Does different things depending on platform. See Maximize for more. """ - if sys.platform != 'linux': - self.TKroot.state('normal') + if self.TKroot.state() == 'iconic': + self.TKroot.deiconify() else: - self.TKroot.attributes('-fullscreen', False) + if sys.platform != 'linux': + self.TKroot.state('normal') + else: + self.TKroot.attributes('-fullscreen', False) def _StartMove(self, event): """ @@ -7990,6 +8019,8 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form): element.TKStringVar = tk.StringVar() element.TKStringVar.set(default_text) show = element.PasswordCharacter if element.PasswordCharacter else "" + # bd = element.BorderDepth if element.BorderDepth is not None else border_depth + bd = border_depth if element.Justification is not None: justification = element.Justification else: @@ -7997,7 +8028,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form): justify = tk.LEFT if justification == 'left' else tk.CENTER if justification == 'center' else tk.RIGHT # anchor = tk.NW if justification == 'left' else tk.N if justification == 'center' else tk.NE element.TKEntry = element.Widget = tk.Entry(tk_row_frame, width=element_size[0], - textvariable=element.TKStringVar, bd=border_depth, + textvariable=element.TKStringVar, bd=bd, font=font, show=show, justify=justify) if element.ChangeSubmits: element.TKEntry.bind('', element._KeyboardHandler) @@ -8084,7 +8115,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form): element.TKCombo.pack(side=tk.LEFT, padx=elementpad[0], pady=elementpad[1]) if element.Visible is False: element.TKCombo.pack_forget() - if element.DefaultValue: + if element.DefaultValue is not None: for i, v in enumerate(element.Values): if v == element.DefaultValue: element.TKCombo.current(i) @@ -8588,6 +8619,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form): # row_should_expand = True # ------------------------- SLIDER element ------------------------- # elif element_type == ELEM_TYPE_INPUT_SLIDER: + element = element # type: Slider slider_length = element_size[0] * CharWidthInPixels() slider_width = element_size[1] element.TKIntVar = tk.IntVar() @@ -8619,8 +8651,8 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form): tkscale.config(highlightthickness=0) if element.BackgroundColor is not None and element.BackgroundColor != COLOR_SYSTEM_DEFAULT: tkscale.configure(background=element.BackgroundColor) - if DEFAULT_SCROLLBAR_COLOR != COLOR_SYSTEM_DEFAULT: - tkscale.config(troughcolor=DEFAULT_SCROLLBAR_COLOR) + if element.TroughColor != COLOR_SYSTEM_DEFAULT: + tkscale.config(troughcolor=element.TroughColor) if element.DisableNumericDisplay: tkscale.config(showvalue=0) if text_color is not None and text_color != COLOR_SYSTEM_DEFAULT: @@ -8637,7 +8669,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form): elif element_type == ELEM_TYPE_TABLE: element = element # type: Table frame = tk.Frame(tk_row_frame) - + element.table_frame = frame height = element.NumRows if element.Justification == 'left': anchor = tk.W @@ -9663,313 +9695,801 @@ def SetOptions(icon=None, button_color=None, element_size=(None, None), button_e # Predefined settings that will change the colors and styles # # of the elements. # ############################################################## -LOOK_AND_FEEL_TABLE = {'SystemDefault': - {'BACKGROUND': COLOR_SYSTEM_DEFAULT, - 'TEXT': COLOR_SYSTEM_DEFAULT, - 'INPUT': COLOR_SYSTEM_DEFAULT, 'TEXT_INPUT': COLOR_SYSTEM_DEFAULT, - 'SCROLL': COLOR_SYSTEM_DEFAULT, - 'BUTTON': OFFICIAL_PYSIMPLEGUI_BUTTON_COLOR, - 'PROGRESS': COLOR_SYSTEM_DEFAULT, - 'BORDER': 1, 'SLIDER_DEPTH': 1, - 'PROGRESS_DEPTH': 0}, +LOOK_AND_FEEL_TABLE = { 'SystemDefault': + {'BACKGROUND': COLOR_SYSTEM_DEFAULT, + 'TEXT': COLOR_SYSTEM_DEFAULT, + 'INPUT': COLOR_SYSTEM_DEFAULT, + 'TEXT_INPUT': COLOR_SYSTEM_DEFAULT, + 'SCROLL': COLOR_SYSTEM_DEFAULT, + 'BUTTON': OFFICIAL_PYSIMPLEGUI_BUTTON_COLOR, + 'PROGRESS': COLOR_SYSTEM_DEFAULT, + 'BORDER': 1, 'SLIDER_DEPTH': 1, + 'PROGRESS_DEPTH': 0}, - 'Material1': {'BACKGROUND': '#E3F2FD', - 'TEXT': '#000000', - 'INPUT': '#86A8FF', - 'TEXT_INPUT': '#000000', - 'SCROLL': '#86A8FF', #I can't see it change, so I don't know it is good color. - 'BUTTON': ('#FFFFFF', '#5079D3'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 0, 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0, - 'ACCENT1': '#FF0266', - 'ACCENT2': '#FF5C93', - 'ACCENT3': '#C5003C'}, + 'SystemDefaultForReal': + {'BACKGROUND': COLOR_SYSTEM_DEFAULT, + 'TEXT': COLOR_SYSTEM_DEFAULT, + 'INPUT': COLOR_SYSTEM_DEFAULT, + 'TEXT_INPUT': COLOR_SYSTEM_DEFAULT, + 'SCROLL': COLOR_SYSTEM_DEFAULT, + 'BUTTON': COLOR_SYSTEM_DEFAULT, + 'PROGRESS': COLOR_SYSTEM_DEFAULT, + 'BORDER': 1, 'SLIDER_DEPTH': 1, + 'PROGRESS_DEPTH': 0}, - 'Material2': {'BACKGROUND': '#FAFAFA', - 'TEXT': '#000000', - 'INPUT': '#004EA1', - 'TEXT_INPUT': '#FFFFFF', - 'SCROLL': '#5EA7FF', #I can't see it change, so I don't know it is good color. - 'BUTTON': ('#FFFFFF', '#0079D3'), #based on Reddit color - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 0, 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0, - 'ACCENT1': '#FF0266', - 'ACCENT2': '#FF5C93', - 'ACCENT3': '#C5003C'}, + 'Material1': {'BACKGROUND': '#E3F2FD', + 'TEXT': '#000000', + 'INPUT': '#86A8FF', + 'TEXT_INPUT': '#000000', + 'SCROLL': '#86A8FF', + 'BUTTON': ('#FFFFFF', '#5079D3'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 0, 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0, + 'ACCENT1': '#FF0266', + 'ACCENT2': '#FF5C93', + 'ACCENT3': '#C5003C'}, - 'Reddit': {'BACKGROUND': '#ffffff', - 'TEXT': '#1a1a1b', - 'INPUT': '#dae0e6', - 'TEXT_INPUT': '#222222', - 'SCROLL': '#a5a4a4', - 'BUTTON': ('white', '#0079d3'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0, - 'ACCENT1': '#ff5414', - 'ACCENT2': '#33a8ff', - 'ACCENT3': '#dbf0ff'}, + 'Material2': {'BACKGROUND': '#FAFAFA', + 'TEXT': '#000000', + 'INPUT': '#004EA1', + 'TEXT_INPUT': '#FFFFFF', + 'SCROLL': '#5EA7FF', + 'BUTTON': ('#FFFFFF', '#0079D3'), # based on Reddit color + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 0, 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0, + 'ACCENT1': '#FF0266', + 'ACCENT2': '#FF5C93', + 'ACCENT3': '#C5003C'}, - 'Topanga': {'BACKGROUND': '#282923', - 'TEXT': '#E7DB74', - 'INPUT': '#393a32', - 'TEXT_INPUT': '#E7C855', - 'SCROLL': '#E7C855', - 'BUTTON': ('#E7C855', '#284B5A'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0, - 'ACCENT1': '#c15226', - 'ACCENT2': '#7a4d5f', - 'ACCENT3': '#889743'}, + 'Reddit': {'BACKGROUND': '#ffffff', + 'TEXT': '#1a1a1b', + 'INPUT': '#dae0e6', + 'TEXT_INPUT': '#222222', + 'SCROLL': '#a5a4a4', + 'BUTTON': ('white', '#0079d3'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0, + 'ACCENT1': '#ff5414', + 'ACCENT2': '#33a8ff', + 'ACCENT3': '#dbf0ff'}, - 'GreenTan': {'BACKGROUND': '#9FB8AD', - 'TEXT': COLOR_SYSTEM_DEFAULT, - 'INPUT': '#F7F3EC', 'TEXT_INPUT': 'black', - 'SCROLL': '#F7F3EC', - 'BUTTON': ('white', '#475841'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'Topanga': {'BACKGROUND': '#282923', + 'TEXT': '#E7DB74', + 'INPUT': '#393a32', + 'TEXT_INPUT': '#E7C855', + 'SCROLL': '#E7C855', + 'BUTTON': ('#E7C855', '#284B5A'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0, + 'ACCENT1': '#c15226', + 'ACCENT2': '#7a4d5f', + 'ACCENT3': '#889743'}, - 'Dark': {'BACKGROUND': 'gray25', - 'TEXT': 'white', - 'INPUT': 'gray30', - 'TEXT_INPUT': 'white', - 'SCROLL': 'gray44', - 'BUTTON': ('white', '#004F00'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'GreenTan': {'BACKGROUND': '#9FB8AD', + 'TEXT': COLOR_SYSTEM_DEFAULT, + 'INPUT': '#F7F3EC', 'TEXT_INPUT': 'black', + 'SCROLL': '#F7F3EC', + 'BUTTON': ('white', '#475841'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'LightGreen': {'BACKGROUND': '#B7CECE', - 'TEXT': 'black', - 'INPUT': '#FDFFF7', - 'TEXT_INPUT': 'black', - 'SCROLL': '#FDFFF7', - 'BUTTON': ('white', '#658268'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'ACCENT1': '#76506d', - 'ACCENT2': '#5148f1', - 'ACCENT3': '#0a1c84', - 'PROGRESS_DEPTH': 0}, + 'Dark': {'BACKGROUND': '#404040', + 'TEXT': 'white', + 'INPUT': '#4D4D4D', + 'TEXT_INPUT': 'white', + 'SCROLL': '#707070', + 'BUTTON': ('white', '#004F00'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'Dark2': {'BACKGROUND': 'gray25', - 'TEXT': 'white', - 'INPUT': 'white', - 'TEXT_INPUT': 'black', - 'SCROLL': 'gray44', - 'BUTTON': ('white', '#004F00'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'LightGreen': {'BACKGROUND': '#B7CECE', + 'TEXT': 'black', + 'INPUT': '#FDFFF7', + 'TEXT_INPUT': 'black', + 'SCROLL': '#FDFFF7', + 'BUTTON': ('white', '#658268'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'ACCENT1': '#76506d', + 'ACCENT2': '#5148f1', + 'ACCENT3': '#0a1c84', + 'PROGRESS_DEPTH': 0}, - 'Black': {'BACKGROUND': 'black', - 'TEXT': 'white', - 'INPUT': 'gray30', - 'TEXT_INPUT': 'white', - 'SCROLL': 'gray44', - 'BUTTON': ('black', 'white'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'Dark2': {'BACKGROUND': '#404040', + 'TEXT': 'white', + 'INPUT': 'white', + 'TEXT_INPUT': 'black', + 'SCROLL': '#707070', + 'BUTTON': ('white', '#004F00'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'Tan': {'BACKGROUND': '#fdf6e3', - 'TEXT': '#268bd1', - 'INPUT': '#eee8d5', - 'TEXT_INPUT': '#6c71c3', - 'SCROLL': '#eee8d5', - 'BUTTON': ('white', '#063542'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'Black': {'BACKGROUND': 'black', + 'TEXT': 'white', + 'INPUT': '#4D4D4D', + 'TEXT_INPUT': 'white', + 'SCROLL': '#707070', + 'BUTTON': ('black', 'white'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'TanBlue': {'BACKGROUND': '#e5dece', - 'TEXT': '#063289', - 'INPUT': '#f9f8f4', - 'TEXT_INPUT': '#242834', - 'SCROLL': '#eee8d5', - 'BUTTON': ('white', '#063289'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'Tan': {'BACKGROUND': '#fdf6e3', + 'TEXT': '#268bd1', + 'INPUT': '#eee8d5', + 'TEXT_INPUT': '#6c71c3', + 'SCROLL': '#eee8d5', + 'BUTTON': ('white', '#063542'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'DarkTanBlue': {'BACKGROUND': '#242834', - 'TEXT': '#dfe6f8', - 'INPUT': '#97755c', - 'TEXT_INPUT': 'white', - 'SCROLL': '#a9afbb', - 'BUTTON': ('white', '#063289'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'TanBlue': {'BACKGROUND': '#e5dece', + 'TEXT': '#063289', + 'INPUT': '#f9f8f4', + 'TEXT_INPUT': '#242834', + 'SCROLL': '#eee8d5', + 'BUTTON': ('white', '#063289'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'DarkAmber': {'BACKGROUND': '#2c2825', - 'TEXT': '#fdcb52', - 'INPUT': '#705e52', - 'TEXT_INPUT': '#fdcb52', - 'SCROLL': '#705e52', - 'BUTTON': ('black', '#fdcb52'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'DarkTanBlue': {'BACKGROUND': '#242834', + 'TEXT': '#dfe6f8', + 'INPUT': '#97755c', + 'TEXT_INPUT': 'white', + 'SCROLL': '#a9afbb', + 'BUTTON': ('white', '#063289'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'DarkBlue': {'BACKGROUND': '#1a2835', - 'TEXT': '#d1ecff', - 'INPUT': '#335267', - 'TEXT_INPUT': '#acc2d0', - 'SCROLL': '#1b6497', - 'BUTTON': ('black', '#fafaf8'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'DarkAmber': {'BACKGROUND': '#2c2825', + 'TEXT': '#fdcb52', + 'INPUT': '#705e52', + 'TEXT_INPUT': '#fdcb52', + 'SCROLL': '#705e52', + 'BUTTON': ('black', '#fdcb52'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'Reds': {'BACKGROUND': '#280001', - 'TEXT': 'white', - 'INPUT': '#d8d584', - 'TEXT_INPUT': 'black', - 'SCROLL': '#763e00', - 'BUTTON': ('black', '#daad28'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'DarkBlue': {'BACKGROUND': '#1a2835', + 'TEXT': '#d1ecff', + 'INPUT': '#335267', + 'TEXT_INPUT': '#acc2d0', + 'SCROLL': '#1b6497', + 'BUTTON': ('black', '#fafaf8'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'Green': {'BACKGROUND': '#82a459', - 'TEXT': 'black', - 'INPUT': '#d8d584', - 'TEXT_INPUT': 'black', - 'SCROLL': '#e3ecf3', - 'BUTTON': ('white', '#517239'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'Reds': {'BACKGROUND': '#280001', + 'TEXT': 'white', + 'INPUT': '#d8d584', + 'TEXT_INPUT': 'black', + 'SCROLL': '#763e00', + 'BUTTON': ('black', '#daad28'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'BluePurple': {'BACKGROUND': '#A5CADD', - 'TEXT': '#6E266E', - 'INPUT': '#E0F5FF', - 'TEXT_INPUT': 'black', - 'SCROLL': '#E0F5FF', - 'BUTTON': ('white', '#303952'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'Green': {'BACKGROUND': '#82a459', + 'TEXT': 'black', + 'INPUT': '#d8d584', + 'TEXT_INPUT': 'black', + 'SCROLL': '#e3ecf3', + 'BUTTON': ('white', '#517239'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'Purple': {'BACKGROUND': '#B0AAC2', - 'TEXT': 'black', - 'INPUT': '#F2EFE8', - 'SCROLL': '#F2EFE8', - 'TEXT_INPUT': 'black', - 'BUTTON': ('black', '#C2D4D8'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'BluePurple': {'BACKGROUND': '#A5CADD', + 'TEXT': '#6E266E', + 'INPUT': '#E0F5FF', + 'TEXT_INPUT': 'black', + 'SCROLL': '#E0F5FF', + 'BUTTON': ('white', '#303952'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'BlueMono': {'BACKGROUND': '#AAB6D3', - 'TEXT': 'black', - 'INPUT': '#F1F4FC', - 'SCROLL': '#F1F4FC', - 'TEXT_INPUT': 'black', - 'BUTTON': ('white', '#7186C7'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'Purple': {'BACKGROUND': '#B0AAC2', + 'TEXT': 'black', + 'INPUT': '#F2EFE8', + 'SCROLL': '#F2EFE8', + 'TEXT_INPUT': 'black', + 'BUTTON': ('black', '#C2D4D8'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'GreenMono': {'BACKGROUND': '#A8C1B4', - 'TEXT': 'black', - 'INPUT': '#DDE0DE', - 'SCROLL': '#E3E3E3', - 'TEXT_INPUT': 'black', - 'BUTTON': ('white', '#6D9F85'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'BlueMono': {'BACKGROUND': '#AAB6D3', + 'TEXT': 'black', + 'INPUT': '#F1F4FC', + 'SCROLL': '#F1F4FC', + 'TEXT_INPUT': 'black', + 'BUTTON': ('white', '#7186C7'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'BrownBlue': {'BACKGROUND': '#64778d', - 'TEXT': 'white', - 'INPUT': '#f0f3f7', - 'SCROLL': '#A6B2BE', - 'TEXT_INPUT': 'black', - 'BUTTON': ('white', '#283b5b'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'GreenMono': {'BACKGROUND': '#A8C1B4', + 'TEXT': 'black', + 'INPUT': '#DDE0DE', + 'SCROLL': '#E3E3E3', + 'TEXT_INPUT': 'black', + 'BUTTON': ('white', '#6D9F85'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'BrightColors': {'BACKGROUND': '#b4ffb4', - 'TEXT': 'black', - 'INPUT': '#ffff64', - 'SCROLL': '#ffb482', - 'TEXT_INPUT': 'black', - 'BUTTON': ('black', '#ffa0dc'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'BrownBlue': {'BACKGROUND': '#64778d', + 'TEXT': 'white', + 'INPUT': '#f0f3f7', + 'SCROLL': '#A6B2BE', + 'TEXT_INPUT': 'black', + 'BUTTON': ('white', '#283b5b'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'NeutralBlue': {'BACKGROUND': '#92aa9d', - 'TEXT': 'black', - 'INPUT': '#fcfff6', - 'SCROLL': '#fcfff6', - 'TEXT_INPUT': 'black', - 'BUTTON': ('black', '#d0dbbd'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'BrightColors': {'BACKGROUND': '#b4ffb4', + 'TEXT': 'black', + 'INPUT': '#ffff64', + 'SCROLL': '#ffb482', + 'TEXT_INPUT': 'black', + 'BUTTON': ('black', '#ffa0dc'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'Kayak': {'BACKGROUND': '#a7ad7f', - 'TEXT': 'black', - 'INPUT': '#e6d3a8', - 'SCROLL': '#e6d3a8', - 'TEXT_INPUT': 'black', - 'BUTTON': ('white', '#5d907d'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'NeutralBlue': {'BACKGROUND': '#92aa9d', + 'TEXT': 'black', + 'INPUT': '#fcfff6', + 'SCROLL': '#fcfff6', + 'TEXT_INPUT': 'black', + 'BUTTON': ('black', '#d0dbbd'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'SandyBeach': {'BACKGROUND': '#efeccb', - 'TEXT': '#012f2f', - 'INPUT': '#e6d3a8', - 'SCROLL': '#e6d3a8', - 'TEXT_INPUT': '#012f2f', - 'BUTTON': ('white', '#046380'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0}, + 'Kayak': {'BACKGROUND': '#a7ad7f', + 'TEXT': 'black', + 'INPUT': '#e6d3a8', + 'SCROLL': '#e6d3a8', + 'TEXT_INPUT': 'black', + 'BUTTON': ('white', '#5d907d'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, - 'TealMono': {'BACKGROUND': '#a8cfdd', - 'TEXT': 'black', - 'INPUT': '#dfedf2', 'SCROLL': '#dfedf2', - 'TEXT_INPUT': 'black', - 'BUTTON': ('white', '#183440'), - 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, - 'BORDER': 1, - 'SLIDER_DEPTH': 0, - 'PROGRESS_DEPTH': 0} - } + 'SandyBeach': {'BACKGROUND': '#efeccb', + 'TEXT': '#012f2f', + 'INPUT': '#e6d3a8', + 'SCROLL': '#e6d3a8', + 'TEXT_INPUT': '#012f2f', + 'BUTTON': ('white', '#046380'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + 'TealMono': {'BACKGROUND': '#a8cfdd', + 'TEXT': 'black', + 'INPUT': '#dfedf2', + 'SCROLL': '#dfedf2', + 'TEXT_INPUT': 'black', + 'BUTTON': ('white', '#183440'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, +################################## Renamed Original Themes ################################## +'Default': + {'BACKGROUND': COLOR_SYSTEM_DEFAULT, + 'TEXT': COLOR_SYSTEM_DEFAULT, + 'INPUT': COLOR_SYSTEM_DEFAULT, + 'TEXT_INPUT': COLOR_SYSTEM_DEFAULT, + 'SCROLL': COLOR_SYSTEM_DEFAULT, + 'BUTTON': OFFICIAL_PYSIMPLEGUI_BUTTON_COLOR, + 'PROGRESS': COLOR_SYSTEM_DEFAULT, + 'BORDER': 1, 'SLIDER_DEPTH': 1, + 'PROGRESS_DEPTH': 0}, + + 'Default1': + {'BACKGROUND': COLOR_SYSTEM_DEFAULT, + 'TEXT': COLOR_SYSTEM_DEFAULT, + 'INPUT': COLOR_SYSTEM_DEFAULT, + 'TEXT_INPUT': COLOR_SYSTEM_DEFAULT, + 'SCROLL': COLOR_SYSTEM_DEFAULT, + 'BUTTON': COLOR_SYSTEM_DEFAULT, + 'PROGRESS': COLOR_SYSTEM_DEFAULT, + 'BORDER': 1, 'SLIDER_DEPTH': 1, + 'PROGRESS_DEPTH': 0}, + + 'LightBlue': {'BACKGROUND': '#E3F2FD', + 'TEXT': '#000000', + 'INPUT': '#86A8FF', + 'TEXT_INPUT': '#000000', + 'SCROLL': '#86A8FF', + 'BUTTON': ('#FFFFFF', '#5079D3'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 0, 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0, + 'ACCENT1': '#FF0266', + 'ACCENT2': '#FF5C93', + 'ACCENT3': '#C5003C'}, + + 'LightGrey': {'BACKGROUND': '#FAFAFA', + 'TEXT': '#000000', + 'INPUT': '#004EA1', + 'TEXT_INPUT': '#FFFFFF', + 'SCROLL': '#5EA7FF', + 'BUTTON': ('#FFFFFF', '#0079D3'), # based on Reddit color + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 0, 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0, + 'ACCENT1': '#FF0266', + 'ACCENT2': '#FF5C93', + 'ACCENT3': '#C5003C'}, + + 'LightGrey1': {'BACKGROUND': '#ffffff', + 'TEXT': '#1a1a1b', + 'INPUT': '#dae0e6', + 'TEXT_INPUT': '#222222', + 'SCROLL': '#a5a4a4', + 'BUTTON': ('white', '#0079d3'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0, + 'ACCENT1': '#ff5414', + 'ACCENT2': '#33a8ff', + 'ACCENT3': '#dbf0ff'}, + + 'DarkBrown': {'BACKGROUND': '#282923', + 'TEXT': '#E7DB74', + 'INPUT': '#393a32', + 'TEXT_INPUT': '#E7C855', + 'SCROLL': '#E7C855', + 'BUTTON': ('#E7C855', '#284B5A'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0, + 'ACCENT1': '#c15226', + 'ACCENT2': '#7a4d5f', + 'ACCENT3': '#889743'}, + + 'LightGreen1': {'BACKGROUND': '#9FB8AD', + 'TEXT': COLOR_SYSTEM_DEFAULT, + 'INPUT': '#F7F3EC', 'TEXT_INPUT': 'black', + 'SCROLL': '#F7F3EC', + 'BUTTON': ('white', '#475841'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'DarkGrey': {'BACKGROUND': '#404040', + 'TEXT': 'white', + 'INPUT': '#4D4D4D', + 'TEXT_INPUT': 'white', + 'SCROLL': '#707070', + 'BUTTON': ('white', '#004F00'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'LightGreen2': {'BACKGROUND': '#B7CECE', + 'TEXT': 'black', + 'INPUT': '#FDFFF7', + 'TEXT_INPUT': 'black', + 'SCROLL': '#FDFFF7', + 'BUTTON': ('white', '#658268'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'ACCENT1': '#76506d', + 'ACCENT2': '#5148f1', + 'ACCENT3': '#0a1c84', + 'PROGRESS_DEPTH': 0}, + + 'DarkGrey1': {'BACKGROUND': '#404040', + 'TEXT': 'white', + 'INPUT': 'white', + 'TEXT_INPUT': 'black', + 'SCROLL': '#707070', + 'BUTTON': ('white', '#004F00'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'DarkBlack': {'BACKGROUND': 'black', + 'TEXT': 'white', + 'INPUT': '#4D4D4D', + 'TEXT_INPUT': 'white', + 'SCROLL': '#707070', + 'BUTTON': ('black', 'white'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'LightBrown': {'BACKGROUND': '#fdf6e3', + 'TEXT': '#268bd1', + 'INPUT': '#eee8d5', + 'TEXT_INPUT': '#6c71c3', + 'SCROLL': '#eee8d5', + 'BUTTON': ('white', '#063542'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'LightBrown1': {'BACKGROUND': '#e5dece', + 'TEXT': '#063289', + 'INPUT': '#f9f8f4', + 'TEXT_INPUT': '#242834', + 'SCROLL': '#eee8d5', + 'BUTTON': ('white', '#063289'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'DarkBlue1': {'BACKGROUND': '#242834', + 'TEXT': '#dfe6f8', + 'INPUT': '#97755c', + 'TEXT_INPUT': 'white', + 'SCROLL': '#a9afbb', + 'BUTTON': ('white', '#063289'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'DarkBrown1': {'BACKGROUND': '#2c2825', + 'TEXT': '#fdcb52', + 'INPUT': '#705e52', + 'TEXT_INPUT': '#fdcb52', + 'SCROLL': '#705e52', + 'BUTTON': ('black', '#fdcb52'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'DarkBlue2': {'BACKGROUND': '#1a2835', + 'TEXT': '#d1ecff', + 'INPUT': '#335267', + 'TEXT_INPUT': '#acc2d0', + 'SCROLL': '#1b6497', + 'BUTTON': ('black', '#fafaf8'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'DarkBrown2': {'BACKGROUND': '#280001', + 'TEXT': 'white', + 'INPUT': '#d8d584', + 'TEXT_INPUT': 'black', + 'SCROLL': '#763e00', + 'BUTTON': ('black', '#daad28'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'DarkGreen': {'BACKGROUND': '#82a459', + 'TEXT': 'black', + 'INPUT': '#d8d584', + 'TEXT_INPUT': 'black', + 'SCROLL': '#e3ecf3', + 'BUTTON': ('white', '#517239'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'LightBlue1': {'BACKGROUND': '#A5CADD', + 'TEXT': '#6E266E', + 'INPUT': '#E0F5FF', + 'TEXT_INPUT': 'black', + 'SCROLL': '#E0F5FF', + 'BUTTON': ('white', '#303952'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'LightPurple': {'BACKGROUND': '#B0AAC2', + 'TEXT': 'black', + 'INPUT': '#F2EFE8', + 'SCROLL': '#F2EFE8', + 'TEXT_INPUT': 'black', + 'BUTTON': ('black', '#C2D4D8'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'LightBlue2': {'BACKGROUND': '#AAB6D3', + 'TEXT': 'black', + 'INPUT': '#F1F4FC', + 'SCROLL': '#F1F4FC', + 'TEXT_INPUT': 'black', + 'BUTTON': ('white', '#7186C7'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'LightGreen3': {'BACKGROUND': '#A8C1B4', + 'TEXT': 'black', + 'INPUT': '#DDE0DE', + 'SCROLL': '#E3E3E3', + 'TEXT_INPUT': 'black', + 'BUTTON': ('white', '#6D9F85'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'DarkBlue3': {'BACKGROUND': '#64778d', + 'TEXT': 'white', + 'INPUT': '#f0f3f7', + 'SCROLL': '#A6B2BE', + 'TEXT_INPUT': 'black', + 'BUTTON': ('white', '#283b5b'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'LightGreen4': {'BACKGROUND': '#b4ffb4', + 'TEXT': 'black', + 'INPUT': '#ffff64', + 'SCROLL': '#ffb482', + 'TEXT_INPUT': 'black', + 'BUTTON': ('black', '#ffa0dc'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'LightGreen5': {'BACKGROUND': '#92aa9d', + 'TEXT': 'black', + 'INPUT': '#fcfff6', + 'SCROLL': '#fcfff6', + 'TEXT_INPUT': 'black', + 'BUTTON': ('black', '#d0dbbd'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'LightBrown2': {'BACKGROUND': '#a7ad7f', + 'TEXT': 'black', + 'INPUT': '#e6d3a8', + 'SCROLL': '#e6d3a8', + 'TEXT_INPUT': 'black', + 'BUTTON': ('white', '#5d907d'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'LightBrown3': {'BACKGROUND': '#efeccb', + 'TEXT': '#012f2f', + 'INPUT': '#e6d3a8', + 'SCROLL': '#e6d3a8', + 'TEXT_INPUT': '#012f2f', + 'BUTTON': ('white', '#046380'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + 'LightBlue3': {'BACKGROUND': '#a8cfdd', + 'TEXT': 'black', + 'INPUT': '#dfedf2', + 'SCROLL': '#dfedf2', + 'TEXT_INPUT': 'black', + 'BUTTON': ('white', '#183440'), + 'PROGRESS': DEFAULT_PROGRESS_BAR_COLOR, + 'BORDER': 1, + 'SLIDER_DEPTH': 0, + 'PROGRESS_DEPTH': 0}, + + +################################## End Renamed Original Themes ################################## + + +# + 'LightBrown4': {'BACKGROUND': '#d7c79e', 'TEXT': '#a35638', 'INPUT': '#9dab86', 'TEXT_INPUT': '#000000', 'SCROLL': '#a35638', 'BUTTON': ('white', '#a35638'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#a35638', '#9dab86', '#e08f62', '#d7c79e'], }, + 'DarkTeal': {'BACKGROUND': '#003f5c', 'TEXT': '#fb5b5a', 'INPUT': '#bc4873', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#bc4873', 'BUTTON': ('white', '#fb5b5a'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#003f5c', '#472b62', '#bc4873', '#fb5b5a'], }, + 'DarkPurple': {'BACKGROUND': '#472b62', 'TEXT': '#fb5b5a', 'INPUT': '#bc4873', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#bc4873', 'BUTTON': ('#FFFFFF', '#472b62'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#003f5c', '#472b62', '#bc4873', '#fb5b5a'], }, + 'LightGreen6': {'BACKGROUND': '#eafbea', 'TEXT': '#1f6650', 'INPUT': '#6f9a8d', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#1f6650', 'BUTTON': ('white', '#1f6650'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#1f6650', '#6f9a8d', '#ea5e5e', '#eafbea'], }, + 'DarkGrey2': {'BACKGROUND': '#2b2b28', 'TEXT': '#f8f8f8', 'INPUT': '#f1d6ab', 'TEXT_INPUT': '#000000', 'SCROLL': '#f1d6ab', 'BUTTON': ('#2b2b28', '#e3b04b'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#2b2b28', '#e3b04b', '#f1d6ab', '#f8f8f8'], }, + 'LightBrown6': {'BACKGROUND': '#f9b282', 'TEXT': '#8f4426', 'INPUT': '#de6b35', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#8f4426', 'BUTTON': ('white', '#8f4426'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#8f4426', '#de6b35', '#64ccda', '#f9b282'], }, + 'DarkTeal1': {'BACKGROUND': '#396362', 'TEXT': '#ffe7d1', 'INPUT': '#f6c89f', 'TEXT_INPUT': '#000000', 'SCROLL': '#f6c89f', + 'BUTTON': ('#ffe7d1', '#4b8e8d'), 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#396362', '#4b8e8d', '#f6c89f', '#ffe7d1'],}, + 'LightBrown7': {'BACKGROUND': '#f6c89f', 'TEXT': '#396362', 'INPUT': '#4b8e8d', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#396362', + 'BUTTON': ('white', '#396362'), 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#396362', '#4b8e8d', '#f6c89f', '#ffe7d1'],}, + 'DarkPurple1': {'BACKGROUND': '#0c093c', 'TEXT': '#fad6d6', 'INPUT': '#eea5f6', 'TEXT_INPUT': '#000000', 'SCROLL': '#eea5f6', 'BUTTON': ('#FFFFFF', '#df42d1'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#0c093c', '#df42d1', '#eea5f6', '#fad6d6'], }, + 'DarkGrey3': {'BACKGROUND': '#211717', 'TEXT': '#dfddc7', 'INPUT': '#f58b54', 'TEXT_INPUT': '#000000', 'SCROLL': '#f58b54', 'BUTTON': ('#dfddc7', '#a34a28'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#211717', '#a34a28', '#f58b54', '#dfddc7'], }, + 'LightBrown8': {'BACKGROUND': '#dfddc7', 'TEXT': '#211717', 'INPUT': '#a34a28', 'TEXT_INPUT': '#dfddc7', 'SCROLL': '#211717', 'BUTTON': ('#dfddc7', '#a34a28'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#211717', '#a34a28', '#f58b54', '#dfddc7'], }, + 'DarkBlue4': {'BACKGROUND': '#494ca2', 'TEXT': '#e3e7f1', 'INPUT': '#c6cbef', 'TEXT_INPUT': '#000000', 'SCROLL': '#c6cbef', 'BUTTON': ('#FFFFFF', '#8186d5'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#494ca2', '#8186d5', '#c6cbef', '#e3e7f1'],}, + 'LightBlue4': {'BACKGROUND': '#5c94bd', 'TEXT': '#470938', 'INPUT': '#1a3e59', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#470938', 'BUTTON': ('white', '#470938'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#470938', '#1a3e59', '#5c94bd', '#f2d6eb'],}, + 'DarkTeal2': {'BACKGROUND': '#394a6d', 'TEXT': '#c0ffb3', 'INPUT': '#52de97', 'TEXT_INPUT': '#000000', 'SCROLL': '#52de97', + 'BUTTON': ('#c0ffb3', '#394a6d'), 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#394a6d', '#3c9d9b', '#52de97', '#c0ffb3'],}, + 'DarkTeal3': {'BACKGROUND': '#3c9d9b', 'TEXT': '#c0ffb3', 'INPUT': '#52de97', 'TEXT_INPUT': '#000000', 'SCROLL': '#52de97', + 'BUTTON': ('#c0ffb3', '#394a6d'), 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#394a6d', '#3c9d9b', '#52de97', '#c0ffb3'], }, + 'DarkPurple5': {'BACKGROUND': '#730068', 'TEXT': '#f6f078', 'INPUT': '#01d28e', 'TEXT_INPUT': '#000000', 'SCROLL': '#01d28e', 'BUTTON': ('#f6f078', '#730068'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#730068', '#434982', '#01d28e', '#f6f078'],}, + 'DarkPurple2': {'BACKGROUND': '#202060', 'TEXT': '#b030b0', 'INPUT': '#602080', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#602080', 'BUTTON': ('white', '#202040'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#202040', '#202060', '#602080', '#b030b0'], }, + 'DarkBlue5': {'BACKGROUND': '#000272', 'TEXT': '#ff6363', 'INPUT': '#a32f80', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#a32f80', 'BUTTON': ('#FFFFFF', '#341677'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#000272', '#341677', '#a32f80', '#ff6363'], }, + 'LightGrey2': {'BACKGROUND': '#f6f6f6', 'TEXT': '#420000', 'INPUT': '#d4d7dd', 'TEXT_INPUT': '#420000', 'SCROLL': '#420000', 'BUTTON': ('#420000', '#d4d7dd'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#420000', '#d4d7dd', '#eae9e9', '#f6f6f6'],}, + 'LightGrey3': {'BACKGROUND': '#eae9e9', 'TEXT': '#420000', 'INPUT': '#d4d7dd', 'TEXT_INPUT': '#420000', 'SCROLL': '#420000', 'BUTTON': ('#420000', '#d4d7dd'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#420000', '#d4d7dd', '#eae9e9', '#f6f6f6'], }, + 'DarkBlue6': {'BACKGROUND': '#01024e', 'TEXT': '#ff6464', 'INPUT': '#8b4367', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#8b4367', 'BUTTON': ('#FFFFFF', '#543864'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#01024e', '#543864', '#8b4367', '#ff6464'],}, + 'DarkBlue7': {'BACKGROUND': '#241663', 'TEXT': '#eae7af', 'INPUT': '#a72693', 'TEXT_INPUT': '#eae7af', 'SCROLL': '#a72693', 'BUTTON': ('#eae7af', '#160f30'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#160f30', '#241663', '#a72693', '#eae7af'], }, + 'LightBrown9': {'BACKGROUND': '#f6d365', 'TEXT': '#3a1f5d', 'INPUT': '#c83660', 'TEXT_INPUT': '#f6d365', 'SCROLL': '#3a1f5d', 'BUTTON': ('#f6d365', '#c83660'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#3a1f5d', '#c83660', '#e15249', '#f6d365'], }, + 'DarkPurple3': {'BACKGROUND': '#6e2142', 'TEXT': '#ffd692', 'INPUT': '#e16363', 'TEXT_INPUT': '#ffd692', 'SCROLL': '#e16363', 'BUTTON': ('#ffd692', '#943855'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#6e2142', '#943855', '#e16363', '#ffd692'], }, + 'LightBrown10': {'BACKGROUND': '#ffd692', 'TEXT': '#6e2142', 'INPUT': '#943855', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#6e2142', 'BUTTON': ('white', '#6e2142'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#6e2142', '#943855', '#e16363', '#ffd692'],}, + 'DarkPurple4': {'BACKGROUND': '#200f21', 'TEXT': '#f638dc', 'INPUT': '#5a3d5c', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#5a3d5c', 'BUTTON': ('#FFFFFF', '#382039'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#200f21', '#382039', '#5a3d5c', '#f638dc'],}, + 'LightBlue5': {'BACKGROUND': '#b2fcff', 'TEXT': '#3e64ff', 'INPUT': '#5edfff', 'TEXT_INPUT': '#000000', 'SCROLL': '#3e64ff', 'BUTTON': ('white', '#3e64ff'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#3e64ff', '#5edfff', '#b2fcff', '#ecfcff'], }, + 'DarkTeal4': {'BACKGROUND': '#464159', 'TEXT': '#c7f0db', 'INPUT': '#8bbabb', 'TEXT_INPUT': '#000000', 'SCROLL': '#8bbabb', + 'BUTTON': ('#FFFFFF', '#6c7b95'), 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#464159', '#6c7b95', '#8bbabb', '#c7f0db'], }, + 'LightTeal': {'BACKGROUND': '#c7f0db', 'TEXT': '#464159', 'INPUT': '#6c7b95', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#464159', + 'BUTTON': ('white', '#464159'), 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#464159', '#6c7b95', '#8bbabb', '#c7f0db'],}, + 'DarkTeal5': {'BACKGROUND': '#8bbabb', 'TEXT': '#464159', 'INPUT': '#6c7b95', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#464159', + 'BUTTON': ('#c7f0db', '#6c7b95'), 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#464159', '#6c7b95', '#8bbabb', '#c7f0db'], }, + 'LightGrey4': {'BACKGROUND': '#faf5ef', 'TEXT': '#672f2f', 'INPUT': '#99b19c', 'TEXT_INPUT': '#672f2f', 'SCROLL': '#672f2f', 'BUTTON': ('#672f2f', '#99b19c'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#672f2f', '#99b19c', '#d7d1c9', '#faf5ef'], }, + 'LightGreen7': {'BACKGROUND': '#99b19c', 'TEXT': '#faf5ef', 'INPUT': '#d7d1c9', 'TEXT_INPUT': '#000000', 'SCROLL': '#d7d1c9', 'BUTTON': ('#FFFFFF', '#99b19c'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#672f2f', '#99b19c', '#d7d1c9', '#faf5ef'],}, + 'LightGrey5': {'BACKGROUND': '#d7d1c9', 'TEXT': '#672f2f', 'INPUT': '#99b19c', 'TEXT_INPUT': '#672f2f', 'SCROLL': '#672f2f', 'BUTTON': ('white', '#672f2f'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#672f2f', '#99b19c', '#d7d1c9', '#faf5ef'], }, + 'DarkBrown3': {'BACKGROUND': '#a0855b', 'TEXT': '#f9f6f2', 'INPUT': '#f1d6ab', 'TEXT_INPUT': '#000000', 'SCROLL': '#f1d6ab', 'BUTTON': ('white', '#38470b'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#38470b', '#a0855b', '#f1d6ab', '#f9f6f2'], }, + 'LightBrown11': {'BACKGROUND': '#f1d6ab', 'TEXT': '#38470b', 'INPUT': '#a0855b', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#38470b', 'BUTTON': ('#f9f6f2', '#a0855b'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#38470b', '#a0855b', '#f1d6ab', '#f9f6f2'],}, + 'DarkRed': {'BACKGROUND': '#83142c', 'TEXT': '#f9d276', 'INPUT': '#ad1d45', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#ad1d45', 'BUTTON': ('#f9d276', '#ad1d45'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#44000d', '#83142c', '#ad1d45', '#f9d276'], }, + 'DarkTeal6': {'BACKGROUND': '#204969', 'TEXT': '#fff7f7', 'INPUT': '#dadada', 'TEXT_INPUT': '#000000', 'SCROLL': '#dadada', + 'BUTTON': ('black', '#fff7f7'), 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#204969', '#08ffc8', '#dadada', '#fff7f7'],}, + 'DarkBrown4': {'BACKGROUND': '#252525', 'TEXT': '#ff0000', 'INPUT': '#af0404', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#af0404', 'BUTTON': ('white', '#252525'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#252525', '#414141', '#af0404', '#ff0000'], }, + 'LightYellow': {'BACKGROUND': '#f4ff61', 'TEXT': '#27aa80', 'INPUT': '#32ff6a', 'TEXT_INPUT': '#000000', 'SCROLL': '#27aa80', 'BUTTON': ('#f4ff61', '#27aa80'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#27aa80', '#32ff6a', '#a8ff3e', '#f4ff61'],}, + 'DarkGreen1': {'BACKGROUND': '#2b580c', 'TEXT': '#fdef96', 'INPUT': '#f7b71d', 'TEXT_INPUT': '#000000', 'SCROLL': '#f7b71d', 'BUTTON': ('#fdef96', '#2b580c'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#2b580c', '#afa939', '#f7b71d', '#fdef96'], }, + 'LightGreen8': {'BACKGROUND': '#c8dad3', 'TEXT': '#63707e', 'INPUT': '#93b5b3', 'TEXT_INPUT': '#000000', 'SCROLL': '#63707e', 'BUTTON': ('white', '#63707e'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#63707e', '#93b5b3', '#c8dad3', '#f2f6f5'], }, + 'DarkTeal7': {'BACKGROUND': '#248ea9', 'TEXT': '#fafdcb', 'INPUT': '#aee7e8', 'TEXT_INPUT': '#000000', 'SCROLL': '#aee7e8', 'BUTTON': ('black', '#fafdcb'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#248ea9', '#28c3d4', '#aee7e8', '#fafdcb'],}, +'DarkBlue8': {'BACKGROUND': '#454d66', 'TEXT': '#d9d872', 'INPUT': '#58b368', 'TEXT_INPUT': '#000000', 'SCROLL': '#58b368', + 'BUTTON': ('black', '#009975'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#009975', '#454d66', '#58b368', '#d9d872'], }, + 'DarkBlue9': {'BACKGROUND': '#263859', 'TEXT': '#ff6768', 'INPUT': '#6b778d', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#6b778d', 'BUTTON': ('#ff6768', '#263859'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#17223b', '#263859', '#6b778d', '#ff6768'], }, + 'DarkBlue10': {'BACKGROUND': '#0028ff', 'TEXT': '#f1f4df', 'INPUT': '#10eaf0', 'TEXT_INPUT': '#000000', 'SCROLL': '#10eaf0', 'BUTTON': ('#f1f4df', '#24009c'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#24009c', '#0028ff', '#10eaf0', '#f1f4df'],}, + 'DarkBlue11': {'BACKGROUND': '#6384b3', 'TEXT': '#e6f0b6', 'INPUT': '#b8e9c0', 'TEXT_INPUT': '#000000', 'SCROLL': '#b8e9c0', 'BUTTON': ('#e6f0b6', '#684949'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#684949', '#6384b3', '#b8e9c0', '#e6f0b6'], }, + + 'DarkTeal8': {'BACKGROUND': '#71a0a5', 'TEXT': '#212121', 'INPUT': '#665c84', 'TEXT_INPUT': '#FFFFFF', 'SCROLL': '#212121', 'BUTTON': ('#fab95b', '#665c84'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#212121', '#665c84', '#71a0a5', '#fab95b']}, + 'DarkRed1': {'BACKGROUND': '#c10000', 'TEXT': '#eeeeee', 'INPUT': '#dedede', 'TEXT_INPUT': '#000000', 'SCROLL': '#dedede', 'BUTTON': ('#c10000', '#eeeeee'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#c10000', '#ff4949', '#dedede', '#eeeeee'],}, + 'LightBrown5': {'BACKGROUND': '#fff591', 'TEXT': '#e41749', 'INPUT': '#f5587b', 'TEXT_INPUT': '#000000', 'SCROLL': '#e41749', 'BUTTON': ('#fff591', '#e41749'), + 'PROGRESS': ('#01826B', '#D0D0D0'), 'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0, + 'COLOR_LIST': ['#e41749', '#f5587b', '#ff8a5c', '#fff591']} + } def ListOfLookAndFeelValues(): - """ """ + """ + Get a list of the valid values to pass into your call to change_look_and_feel + :return: List[str] - list of valid string values + """ return list(LOOK_AND_FEEL_TABLE.keys()) @@ -9978,8 +10498,10 @@ def ChangeLookAndFeel(index, force=False): 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 - The look and feel table itself has these indexe into the dictionary LOOK_AND_FEEL_TABLE + The look and feel table itself has these indexes into the dictionary LOOK_AND_FEEL_TABLE. + The original list was (prior to a major rework and renaming)... these names still work... SystemDefault + SystemDefaultForRead Material1 Material2 Reddit @@ -10006,25 +10528,56 @@ def ChangeLookAndFeel(index, force=False): Kayak SandyBeach TealMono + + In Nov 2019 a new Theme Formula was devised to make choosing a theme easier: + The "Formula" is: + ["Dark" or "Light"] Color Number + Colors can be Blue Brown Grey Green Purple Red Teal Yellow Black + The number will vary for each pair. There are more DarkGrey entries than there are LightYellow for example. + Default = The default settings (only button color is different than system default) + Default1 = The full system default including the button (everything's gray... how sad... don't be all gray... please....) :param index: (str) the name of the index into the Look and Feel table :param force: (bool) if True allows Macs to use the look and feel feature. Otherwise Macs are blocked due to problems with button colors """ - if sys.platform == 'darwin' and not force: - print('*** Changing look and feel is not supported on Mac platform ***') - return + # if sys.platform.startswith('darwin') and not force: + # print('*** Changing look and feel is not supported on Mac platform ***') + # return - # look and feel table + theme = index + # normalize available l&f values + lf_values = [item.lower() for item in list_of_look_and_feel_values()] + + # option 1 + opt1 = theme.replace(' ', '').lower() + + # option 2 (reverse lookup) + optx = theme.lower().split(' ') + optx.reverse() + opt2 = ''.join(optx) + + # search for valid l&f name + if opt1 in lf_values: + ix = lf_values.index(opt1) + elif opt2 in lf_values: + ix = lf_values.index(opt2) + else: + ix = randint(0,len(lf_values)) + print('** Warning - {} Look and Feel value not valid. Change your ChangeLookAndFeel call. **'.format(index)) + print('valid values are', list_of_look_and_feel_values()) + print('Instead, please enjoy a random Theme named {}'.format(list_of_look_and_feel_values()[ix])) + + selection = list_of_look_and_feel_values()[ix] try: - colors = LOOK_AND_FEEL_TABLE[index] + colors = LOOK_AND_FEEL_TABLE[selection] SetOptions(background_color=colors['BACKGROUND'], text_element_background_color=colors['BACKGROUND'], element_background_color=colors['BACKGROUND'], text_color=colors['TEXT'], input_elements_background_color=colors['INPUT'], - button_color=colors['BUTTON'], + button_color=colors['BUTTON'] if not sys.platform.startswith('darwin') else None, progress_meter_color=colors['PROGRESS'], border_width=colors['BORDER'], slider_border_width=colors['SLIDER_DEPTH'], @@ -10037,14 +10590,46 @@ def ChangeLookAndFeel(index, force=False): print('valid values are', list_of_look_and_feel_values()) +def preview_all_look_and_feel_themes(): + """ + 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 + """ + web=False + + WINDOW_BACKGROUND = 'lightblue' + + def sample_layout(): + return [[Text('Text element'), InputText('Input data here', size=(15, 1))], + [Button('Ok'), Button('Cancel'), Slider((1, 10), orientation='h', size=(10, 15))]] + + layout = [[Text('Here is a complete list of themes', font='Default 18', background_color=WINDOW_BACKGROUND)]] + + names = list_of_look_and_feel_values() + names.sort() + row = [] + for count, theme in enumerate(names): + change_look_and_feel(theme) + if not count % 9: + layout += [row] + row = [] + row += [Frame(theme, sample_layout() if not web else [[T(theme)]] + sample_layout())] + if row: + layout += [row] + + window = Window('Preview of all Look and Feel choices', layout, background_color=WINDOW_BACKGROUND) + window.read() + window.close() + del window # Converts an object's contents into a nice printable string. Great for dumping debug data def ObjToStringSingleObj(obj): """ - - :param obj: - + 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 + :param obj: (Any) The object to display + returns (str) Formatted output of the object's values """ if obj is None: return 'None' @@ -10054,10 +10639,10 @@ def ObjToStringSingleObj(obj): def ObjToString(obj, extra=' '): """ - - :param obj: + Dumps an Object's values as a formatted string. Very nicely done. Great way to display an object's member variables in human form + :param obj: (Any) The object to display :param extra: (Default value = ' ') - + returns (str) Formatted output of the object's values """ if obj is None: return 'None' @@ -10541,6 +11126,7 @@ def PopupCancel(*args, title=None, button_color=None, background_color=None, tex :param grab_anywhere: If True can grab anywhere to move the window (Default = False) :param location: Location on screen to display :param location: + """ return Popup(*args, title=title, button_type=POPUP_BUTTONS_CANCELLED, background_color=background_color, text_color=text_color, @@ -10585,22 +11171,21 @@ def PopupOKCancel(*args, title=None, button_color=None, background_color=None, t """ Display popup with OK and Cancel buttons - :param args: + :param *args: :param title: - :param button_color: - :param background_color: - :param text_color: - :param auto_close: + :param button_color: button color (foreground, background) + :param background_color: color of background + :param text_color: color of the text + :param auto_close: (Default = False) :param auto_close_duration: - :param non_blocking: - :param icon: - :param line_width: - :param font: - :param no_titlebar: - :param grab_anywhere: - :param keep_on_top: - :param location: - :return: + :param non_blocking: (Default = False) + :param icon: Icon to display + :param line_width: Width of lines in characters + :param font: specifies the font family, size, etc + :param no_titlebar: (Default = False) + :param grab_anywhere: If True can grab anywhere to move the window (Default = False) + :param location: Location on screen to display + :return: Union["OK", "Cancel", None] """ return Popup(*args, title=title, button_type=POPUP_BUTTONS_OK_CANCEL, background_color=background_color, text_color=text_color, @@ -10702,7 +11287,7 @@ def PopupGetFolder(message, title=None, default_path='', no_window=False, size=( layout = [[Text(message, auto_size_text=True, text_color=text_color, background_color=background_color)], [InputText(default_text=default_path, size=size, key='_INPUT_'), FolderBrowse(initial_folder=initial_folder)], - [CloseButton('Ok', size=(5, 1), bind_return_key=True), CloseButton('Cancel', size=(5, 1))]] + [Button('Ok', size=(5, 1), bind_return_key=True), Button('Cancel', size=(5, 1))]] window = Window(title=title or message, layout=layout, icon=icon, auto_size_text=True, button_color=button_color, background_color=background_color, @@ -10800,7 +11385,7 @@ def PopupGetFile(message, title=None, default_path='', default_extension='', sav layout = [[Text(message, auto_size_text=True, text_color=text_color, background_color=background_color)], [InputText(default_text=default_path, size=size, key='_INPUT_'), browse_button], - [CloseButton('Ok', size=(6, 1), bind_return_key=True), CloseButton('Cancel', size=(6, 1))]] + [Button('Ok', size=(6, 1), bind_return_key=True), Button('Cancel', size=(6, 1))]] window = Window(title=title or message, layout=layout, icon=icon, auto_size_text=True, button_color=button_color, font=font, @@ -10843,7 +11428,7 @@ def PopupGetText(message, title=None, default_text='', password_char='', size=(N layout = [[Text(message, auto_size_text=True, text_color=text_color, background_color=background_color, font=font)], [InputText(default_text=default_text, size=size, key='_INPUT_', password_char=password_char)], - [CloseButton('Ok', size=(5, 1), bind_return_key=True), CloseButton('Cancel', size=(5, 1))]] + [Button('Ok', size=(5, 1), bind_return_key=True), Button('Cancel', size=(5, 1))]] window = Window(title=title or message, layout=layout, icon=icon, auto_size_text=True, button_color=button_color, no_titlebar=no_titlebar, @@ -11499,8 +12084,8 @@ def main(): :return: """ from random import randint - - ChangeLookAndFeel('GreenTan') + # preview_all_look_and_feel_themes() + ChangeLookAndFeel('Light Green 1') # ------ Menu Definition ------ # menu_def = [['&File', ['!&Open', '&Save::savekey', '---', '&Properties', 'E&xit']], ['!&Edit', ['!&Paste', ['Special', 'Normal', ], 'Undo'], ], diff --git a/readme_creator/dump_stuff.py b/readme_creator/dump_stuff.py index 93b3cc36..f6a80dbc 100644 --- a/readme_creator/dump_stuff.py +++ b/readme_creator/dump_stuff.py @@ -13,7 +13,7 @@ for i in psg_funcs: continue print('') print(f'') - # print('\n'.join(['\t' + j[0] for j in inspect.getmembers(i[1]) if '_' not in j[0] ])) + print('\n'.join(['\t' + j[0] for j in inspect.getmembers(i[1]) if not j[0].startswith('_')])) sg.Popup() sg.Button() \ No newline at end of file diff --git a/readme_creator/readme.md b/readme_creator/readme.md index 6ea89ffd..b905f06c 100644 --- a/readme_creator/readme.md +++ b/readme_creator/readme.md @@ -10,7 +10,7 @@ ![Awesome Meter](https://img.shields.io/badge/Awesome_meter-100-yellow.svg) ![Python Version](https://img.shields.io/badge/Python-2.7_3.x-yellow.svg) -![Python Version](https://img.shields.io/badge/PySimpleGUI_For_Python_3.x_Version-4.5.0-red.svg?longCache=true&style=for-the-badge) +![Python Version](https://img.shields.io/badge/PySimpleGUI_For_Python_3.x_Version-4.6.0-red.svg?longCache=true&style=for-the-badge) ![Python Version](https://img.shields.io/badge/PySimpleGUI_For_Python_2.7_Version-2.4.1-blue.svg?longCache=true&style=for-the-badge) ![Python Version](https://img.shields.io/badge/PySimpleGUIQt_Version-0.28.0-orange.svg?longCache=true&style=for-the-badge) @@ -38,6 +38,8 @@ pip3 install pysimplegui ```python import PySimpleGUI as sg + +sg.change_look_and_feel('DarkAmber') # Add a touch of color # All the stuff inside your window. layout = [ [sg.Text('Some text on Row 1')], [sg.Text('Enter something on Row 2'), sg.InputText()], @@ -59,7 +61,7 @@ window.close() and returns the value input as well as the button clicked. -![image](https://user-images.githubusercontent.com/13696193/61077153-cdfc0b00-a3eb-11e9-9e93-d6ec2ffb442a.png) +![image](https://user-images.githubusercontent.com/46163555/68713283-7cb38200-056b-11ea-990a-aa1603af5a11.png) ### Any Questions? It's that simple. @@ -71,7 +73,6 @@ and returns the value input as well as the button clicked. * sitting on a Raspberry **Pi** with a touchscreen that's going to waste because you don't have the time to learn a GUI SDK? * into Machine Learning and are sick of the command line? * an IT guy/gal that has written some cool tools but due to corporate policies are unable to share unless an EXE file? -* wanting to distribute your Python code to Windows users as a single .EXE file that launches straight into a GUI, much like a WinForms app? * want to share your program with your friends or families (that aren't so freakish that they have Python running) * wanting to run a program in your system tray? * a teacher wanting to teach your students how to program using a GUI? @@ -106,9 +107,10 @@ and returns the value input as well as the button clicked. #### July-2019 Note - This readme is being generated from the PySimpleGUI.py file located on GitHub. As a result, some of the calls or parameters may not match the PySimpleGUI that you pip installed. -## GUI Development does not have to be difficult nor painful. It can be FUN +## GUI Development does not have to be difficult nor painful. It can be (and is) FUN #### What users are saying about PySimpleGUI + ***(None of these comments were solicited & are not paid endorsements - other than a huge thank you they received!)*** "I've been working to learn PyQT for the past week in my off time as an intro to GUI design and how to apply it to my existing scripts... Took me ~30 minutes to figure out PySimpleGUI and get my scripts working with a GUI." @@ -127,6 +129,8 @@ and returns the value input as well as the button clicked. "I love PySimpleGUI! I've been teaching it in my Python classes instead of Tkinter." +"I wish PySimpleGUI was available for every friggin programming language" + ### START HERE - User Manual with Table of Contents [ReadTheDocs](http://www.PySimpleGUI.org) <------ THE best place to read the docs due to TOC, all docs in 1 place, and better formatting. START here in your education. Easy to remember PySimpleGUI.org. @@ -145,7 +149,7 @@ and returns the value input as well as the button clicked. [Repl.it Home for PySimpleGUI](https://repl.it/@PySimpleGUI) -[Lots of screenshots](https://github.com/PySimpleGUI/PySimpleGUI/issues/1) +[Lots of screenshots](https://www.bountysource.com/issues/60766522-screen-shots) [How to submit an Issue](https://github.com/PySimpleGUI/PySimpleGUI/issues/1646) @@ -261,6 +265,7 @@ This makes the coding process extremely quick and the amount of code very small ```python import PySimpleGUI as sg +sg.change_look_and_feel('DarkAmber') # Add a little color to your windows # All the stuff inside your window. This is the PSG magic code compactor... layout = [ [sg.Text('Some text on Row 1')], [sg.Text('Enter something on Row 2'), sg.InputText()], @@ -270,14 +275,14 @@ layout = [ [sg.Text('Some text on Row 1')], window = sg.Window('Window Title', layout) # Event Loop to process "events" while True: - event, values = window.Read() + event, values = window.read() if event in (None, 'Cancel'): break -window.Close() +window.close() ``` -![image](https://user-images.githubusercontent.com/13696193/61077153-cdfc0b00-a3eb-11e9-9e93-d6ec2ffb442a.png) +![image](https://user-images.githubusercontent.com/46163555/68713283-7cb38200-056b-11ea-990a-aa1603af5a11.png) You gotta admit that the code above is a lot more "fun" looking that tkinter code you've studied before. Adding stuff to your GUI is ***trivial***. You can clearly see the "mapping" of those 3 lines of code to specific Elements laid out in a Window. It's not a trick. It's how easy it is to code in PySimpleGUI. With this simple concept comes the ability to create any window layout you wish. There are parameters to move elements around inside the window should you need more control. @@ -774,6 +779,12 @@ Your program have 2 or 3 windows and you're concerned? Below you'll see 11 wind ![pyplot 1](https://user-images.githubusercontent.com/13696193/44683336-11d46480-aa14-11e8-9d6c-f656796fc915.jpg) +Just because you can't match a pair of socks doesn't mean your windows have to all look the same gray color. Choose from over 100 different "Themes". Add 1 line call to `change_look_and_feel` to instantly transform your window from gray to something more visually pleasing to interact with. If you mispell the theme name badly or specify a theme name is is missing from the table of allowed names, then a theme will be randomly assigned for you. Who knows, maybe the theme chosen you'll like and want to use instead of your original plan. + +In PySimpleGUI release 4.6 the number of themes was dramatically increased from a couple dozen to over 100. To use the color schemes shown in the window below, add a call to `change_look_and_feel('Theme Name)` to your code, passing in the name of thd desired color theme. To see this window and the list of available themes on your releeae of softrware, call the function `preview_all_look_and_feel_themes()`. This will create a window with the frames like those below. It will shows you exactly what's available in your version of PySimpleGUI. + +![Nov 2019 Look and Feel Themes](https://user-images.githubusercontent.com/46163555/68987669-91a54500-07f9-11ea-921e-8bf9320e3156.png) + Make beautiful looking, alpha-blended (partially transparent) Rainmeter-style Desktop Widgets that run in the background. ![cpu cores dashboard 2](https://user-images.githubusercontent.com/13696193/47611749-18964c80-da42-11e8-93c4-6821a6fce488.gif) @@ -3854,7 +3865,7 @@ window = sg.Window('Frame with buttons', layout, font=("Helvetica", 12)) In my opinion, the tkinter Canvas Widget is the most powerful of the tkinter widget. While I try my best to completely isolate the user from anything that is tkinter related, the Canvas Element is the one exception. It enables integration with a number of other packages, often with spectacular results. -However, there's another way to get that power and that's through the Graph Element, an even MORE powerful Element as it uses a Canvas that you can directly access if needed. The Graph Element has a large number of drawing methods that the Canvas Element does not have. +However, there's another way to get that power and that's through the Graph Element, an even MORE powerful Element as it uses a Canvas that you can directly access if needed. The Graph Element has a large number of drawing methods that the Canvas Element does not have. Plus, if you need to, you can access the Graph Element's "Canvas" through a member variable. ### Matplotlib, Pyplot Integration @@ -5312,7 +5323,7 @@ This section of the documentation is generated directly from the source code. A Without further delay... here are all of the Elements and the Window class -### Button Element +## Button Element Button Element - Defines all possible buttons. The shortcuts such as Submit, FileBrowse, ... each create a Button @@ -5372,7 +5383,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonCallBack +### ButtonCallBack Not user callable! Called by tkinter when a button is clicked. This is where all the fun begins! @@ -5380,7 +5391,7 @@ Not user callable! Called by tkinter when a button is clicked. This is where al ButtonCallBack() ``` -#### ButtonPressCallBack +### ButtonPressCallBack Not a user callable method. Callback called by tkinter when a "realtime" button is pressed @@ -5394,7 +5405,7 @@ Parameter Descriptions: |---|---| |parm|Event info passed in by tkinter| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -5410,7 +5421,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### ButtonReleaseCallBack +### ButtonReleaseCallBack Not a user callable function. Called by tkinter when a "realtime" button is released @@ -5424,7 +5435,7 @@ Parameter Descriptions: |---|---| |parm|the event info from tkinter| -#### Click +### Click Generates a click of the button as if the user clicked the button Calls the tkinter invoke method for the button @@ -5433,7 +5444,7 @@ Generates a click of the button as if the user clicked the button Click() ``` -#### GetText +### GetText Returns the current text shown on a button @@ -5443,7 +5454,7 @@ Returns the current text shown on a button |---|---| | **return** | (str) The text currently displayed on the button | -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -5457,7 +5468,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -5471,7 +5482,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Button Element. Must call `Window.Read` or `Window.Finalize` prior @@ -5499,7 +5510,23 @@ Parameter Descriptions: |image_subsample|(int) amount to reduce the size of the image. Divides the size by this number. 2=1/2, 3=1/3, 4=1/4, etc| |image_size|Tuple[int, int] Size of the image in pixels (width, height)| -#### click +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### click Generates a click of the button as if the user clicked the button Calls the tkinter invoke method for the button @@ -5508,7 +5535,7 @@ Generates a click of the button as if the user clicked the button click() ``` -#### expand +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -5523,7 +5550,88 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, Height of the element | + +### get_text + +Returns the current text shown on a button + +`get_text()` + +|Name|Meaning| +|---|---| +| **return** | (str) 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Button Element. Must call `Window.Read` or `Window.Finalize` prior @@ -5551,7 +5659,7 @@ Parameter Descriptions: |image_subsample|(int) amount to reduce the size of the image. Divides the size by this number. 2=1/2, 3=1/3, 4=1/4, etc| |image_size|Tuple[int, int] Size of the image in pixels (width, height)| -### ButtonMenu Element +## ButtonMenu Element The Button Menu Element. Creates a button that when clicked will show a menu similar to right click menu @@ -5599,7 +5707,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -5615,7 +5723,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### Click +### Click Generates a click of the button as if the user clicked the button Calls the tkinter invoke method for the button @@ -5624,7 +5732,7 @@ Generates a click of the button as if the user clicked the button Click() ``` -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -5638,7 +5746,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -5652,7 +5760,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the ButtonMenu Element. Must call `Window.Read` or `Window.Finalize` prior @@ -5667,7 +5775,23 @@ Parameter Descriptions: |menu_definition|(List[List]) New menu definition (in menu definition format)| |visible|(bool) control visibility of element| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -5682,7 +5806,78 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the ButtonMenu Element. Must call `Window.Read` or `Window.Finalize` prior @@ -5697,7 +5892,7 @@ Parameter Descriptions: |menu_definition|(List[List]) New menu definition (in menu definition format)| |visible|(bool) control visibility of element| -### Canvas Element +## Canvas Element ``` Canvas(canvas=None, @@ -5725,7 +5920,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -5741,7 +5936,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -5755,7 +5950,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -5769,11 +5964,27 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### TKCanvas +### TKCanvas #### property: TKCanvas -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -5788,7 +5999,82 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -### Checkbox Element +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### tk_canvas + +#### property: tk_canvas + +### 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. + +```python +unhide_row() +``` + +## Checkbox Element Checkbox Element - Displays a checkbox and text next to it @@ -5830,7 +6116,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -5846,7 +6132,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### Get +### Get Return the current state of this checkbox @@ -5856,7 +6142,7 @@ Return the current state of this checkbox |---|---| | **return** | (bool) Current state of checkbox | -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -5870,7 +6156,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -5884,7 +6170,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### 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 @@ -5903,7 +6189,23 @@ Parameter Descriptions: |disabled|(bool) disable or enable element| |visible|(bool) control visibility of element| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -5918,7 +6220,7 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### get +### get Return the current state of this checkbox @@ -5928,7 +6230,78 @@ Return the current state of this checkbox |---|---| | **return** | (bool) Current state of checkbox | -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +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 @@ -5947,7 +6320,7 @@ Parameter Descriptions: |disabled|(bool) disable or enable element| |visible|(bool) control visibility of element| -### Column Element +## Column Element A container element that is used to create a layout within your window's layout @@ -5983,7 +6356,7 @@ Parameter Descriptions: |element_justification|(str) All elements inside the Column will have this justification 'left', 'right', 'center' are valid values| |metadata|(Any) User metadata that can be set to ANYTHING| -#### AddRow +### AddRow Not recommended user call. Used to add rows of Elements to the Column Element. @@ -5997,7 +6370,7 @@ Parameter Descriptions: |---|---| |*args|List[Element] The list of elements for this row| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -6013,7 +6386,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### Layout +### Layout Can use like the Window.Layout method, but it's better to use the layout parameter when creating @@ -6029,7 +6402,7 @@ Parameter Descriptions: ||| | **return** | (Column) Used for chaining | -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -6043,7 +6416,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -6057,7 +6430,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Column Element. Must call `Window.Read` or `Window.Finalize` prior @@ -6071,7 +6444,37 @@ Parameter Descriptions: |---|---| |visible|(bool) control visibility of element| -#### expand +### add_row + +Not recommended user call. Used to add rows of Elements to the Column Element. + +``` +add_row(args) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|*args|List[Element] The list of elements for this row| + +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -6086,7 +6489,26 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### layout +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### layout Can use like the Window.Layout method, but it's better to use the layout parameter when creating @@ -6102,7 +6524,59 @@ Parameter Descriptions: ||| | **return** | (Column) Used for chaining | -#### update +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Column Element. Must call `Window.Read` or `Window.Finalize` prior @@ -6116,7 +6590,7 @@ Parameter Descriptions: |---|---| |visible|(bool) control visibility of element| -### Combo 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. @@ -6160,7 +6634,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -6176,7 +6650,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### Get +### 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. @@ -6187,7 +6661,7 @@ You should be using values from your call to window.Read instead. Know what you |---|---| | **return** | Union[Any, None] Returns the value of what is currently chosen | -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -6201,7 +6675,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -6215,7 +6689,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Combo Element. Must call `Window.Read` or `Window.Finalize` prior @@ -6241,7 +6715,23 @@ Parameter Descriptions: |font|Union[str, Tuple[str, int]] specifies the font family, size, etc| |visible|(bool) control visibility of element| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -6256,7 +6746,7 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### get +### 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. @@ -6267,7 +6757,78 @@ You should be using values from your call to window.Read instead. Know what you |---|---| | **return** | Union[Any, None] Returns the value of what is currently chosen | -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Combo Element. Must call `Window.Read` or `Window.Finalize` prior @@ -6293,140 +6854,7 @@ Parameter Descriptions: |font|Union[str, Tuple[str, int]] specifies the font family, size, etc| |visible|(bool) control visibility of element| -### ErrorElement Element - - A "dummy Element" that is returned when there are error conditions, like trying to find an element that's invalid - -``` -ErrorElement(key=None, metadata=None) -``` - -Parameter Descriptions: - -|Name|Meaning| -|---|---| -|key|Used with window.FindElement and with return values to uniquely identify this element| - -#### ButtonReboundCallback - -Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal -callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button -callback function that is normally called. - -``` -ButtonReboundCallback(event) -``` - -Parameter Descriptions: - -|Name|Meaning| -|---|---| -|event|(unknown) Not used in this function.| - -#### Get - -One of the method names found in other Elements. Used here to return an error string in case it's called - -`Get()` - -|Name|Meaning| -|---|---| -| **return** | (str) A warning text string. | - -#### SetFocus - -Sets the current focus to be on this element - -``` -SetFocus(force=False) -``` - -Parameter Descriptions: - -|Name|Meaning| -|---|---| -|force|(bool) 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: - -|Name|Meaning| -|---|---| -|tooltip_text|(str) the text to show in tooltip.| - -#### Update - -Update method for the Error Element, an element that should not be directly used by developer - -``` -Update(silent_on_error=True, - args, - kwargs) -``` - -Parameter Descriptions: - -|Name|Meaning| -|---|---| -|silent_on_error|(bool) if False, then a Popup window will be shown| -|*args|(Any) meant to "soak up" any normal parameters passed in| -|**kwargs|(Any) meant to "soak up" any keyword parameters that were passed in| -||| -| **return** | (ErrorElement) returns 'self' so call can be chained | - -#### expand - -Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions - -``` -expand(expand_x=False, expand_y=False) -``` - -Parameter Descriptions: - -|Name|Meaning| -|---|---| -|expand_x|(Bool) If True Element will expand in the Horizontal directions| -|expand_y|(Bool) If True Element will expand in the Vertical directions| - -#### get - -One of the method names found in other Elements. Used here to return an error string in case it's called - -`get()` - -|Name|Meaning| -|---|---| -| **return** | (str) A warning text string. | - -#### update - -Update method for the Error Element, an element that should not be directly used by developer - -``` -update(silent_on_error=True, - args, - kwargs) -``` - -Parameter Descriptions: - -|Name|Meaning| -|---|---| -|silent_on_error|(bool) if False, then a Popup window will be shown| -|*args|(Any) meant to "soak up" any normal parameters passed in| -|**kwargs|(Any) meant to "soak up" any keyword parameters that were passed in| -||| -| **return** | (ErrorElement) returns 'self' so call can be chained | - -### Frame Element +## Frame Element A Frame Element that contains other Elements. Encloses with a line around elements and a text label. @@ -6470,7 +6898,7 @@ Parameter Descriptions: |element_justification|(str) All elements inside the Frame will have this justification 'left', 'right', 'center' are valid values| |metadata|(Any) User metadata that can be set to ANYTHING| -#### AddRow +### AddRow Not recommended user call. Used to add rows of Elements to the Frame Element. @@ -6484,7 +6912,7 @@ Parameter Descriptions: |---|---| |*args|List[Element] The list of elements for this row| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -6500,7 +6928,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### Layout +### Layout Can use like the Window.Layout method, but it's better to use the layout parameter when creating @@ -6516,7 +6944,7 @@ Parameter Descriptions: ||| | **return** | (Frame) Used for chaining | -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -6530,7 +6958,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -6544,7 +6972,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Frame Element. Must call `Window.Read` or `Window.Finalize` prior @@ -6559,7 +6987,37 @@ Parameter Descriptions: |value|(Any) New text value to show on frame| |visible|(bool) control visibility of element| -#### expand +### add_row + +Not recommended user call. Used to add rows of Elements to the Frame Element. + +``` +add_row(args) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|*args|List[Element] The list of elements for this row| + +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -6574,7 +7032,26 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### layout +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### layout Can use like the Window.Layout method, but it's better to use the layout parameter when creating @@ -6590,7 +7067,59 @@ Parameter Descriptions: ||| | **return** | (Frame) Used for chaining | -#### update +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Frame Element. Must call `Window.Read` or `Window.Finalize` prior @@ -6605,7 +7134,7 @@ Parameter Descriptions: |value|(Any) New text value to show on frame| |visible|(bool) control visibility of element| -### Graph Element +## Graph Element Creates an area for you to draw on. The MAGICAL property this Element has is that you interact with the element using your own coordinate system. This is an important point!! YOU define where the location @@ -6653,7 +7182,7 @@ Parameter Descriptions: |float_values|(bool) If True x,y coordinates are returned as floats, not ints| |metadata|(Any) User metadata that can be set to ANYTHING| -#### BringFigureToFront +### BringFigureToFront Changes Z-order of figures on the Graph. Brings the indicated figure to the front of all other drawn figures @@ -6667,7 +7196,7 @@ Parameter Descriptions: |---|---| |figure|(int) value returned by tkinter when creating the figure / drawing| -#### ButtonPressCallBack +### ButtonPressCallBack Not a user callable method. Used to get Graph click events. Called by tkinter when button is released @@ -6681,7 +7210,7 @@ Parameter Descriptions: |---|---| |event|(event) event info from tkinter. Contains the x and y coordinates of a click| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -6697,7 +7226,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### ButtonReleaseCallBack +### ButtonReleaseCallBack Not a user callable method. Used to get Graph click events. Called by tkinter when button is released @@ -6711,7 +7240,7 @@ Parameter Descriptions: |---|---| |event|(event) event info from tkinter. Note not used in this method| -#### DeleteFigure +### DeleteFigure Remove from the Graph the figure represented by id. The id is given to you anytime you call a drawing primitive @@ -6725,7 +7254,7 @@ Parameter Descriptions: |---|---| |id|(int) the id returned to you when calling one of the drawing methods| -#### DrawArc +### DrawArc Draws different types of arcs. Uses a "bounding box" to define location @@ -6751,7 +7280,7 @@ Parameter Descriptions: ||| | **return** | Union[int, None] id returned from tkinter that you'll need if you want to manipulate the arc | -#### DrawCircle +### DrawCircle Draws a circle, cenetered at the location provided. Can set the fill and outline colors @@ -6773,7 +7302,7 @@ Parameter Descriptions: ||| | **return** | Union[int, None] id returned from tkinter that you'll need if you want to manipulate the circle | -#### DrawImage +### DrawImage Places an image onto your canvas. It's a really important method for this element as it enables so much @@ -6799,7 +7328,7 @@ Parameter Descriptions: ||| | **return** | Union[int, None] id returned from tkinter that you'll need if you want to manipulate the image | -#### DrawLine +### DrawLine Draws a line from one point to another point using USER'S coordinates. Can set the color and width of line @@ -6821,7 +7350,7 @@ Parameter Descriptions: ||| | **return** | Union[int, None] id returned from tktiner or None if user closed the window. id is used when you
want to manipulate the line | -#### DrawOval +### DrawOval Draws an oval based on coordinates in user coordinate system. Provide the location of a "bounding rectangle" @@ -6843,7 +7372,7 @@ Parameter Descriptions: ||| | **return** | Union[int, None] id returned from tkinter that you'll need if you want to manipulate the oval | -#### DrawPoint +### DrawPoint Draws a "dot" at the point you specify using the USER'S coordinate system @@ -6863,7 +7392,7 @@ Parameter Descriptions: ||| | **return** | Union[int, None] id returned from tkinter that you'll need if you want to manipulate the point | -#### DrawRectangle +### DrawRectangle Draw a rectangle given 2 points. Can control the line and fill colors @@ -6871,7 +7400,8 @@ Draw a rectangle given 2 points. Can control the line and fill colors DrawRectangle(top_left, bottom_right, fill_color=None, - line_color=None) + line_color=None, + line_width=None) ``` Parameter Descriptions: @@ -6885,7 +7415,7 @@ Parameter Descriptions: ||| | **return** | Union[int, None] id returned from tkinter that you'll need if you want to manipulate the rectangle | -#### DrawText +### DrawText Draw some text on your graph. This is how you label graph number lines for example @@ -6911,7 +7441,7 @@ Parameter Descriptions: ||| | **return** | Union[int, None] id returned from tkinter that you'll need if you want to manipulate the text | -#### Erase +### Erase Erase the Graph - Removes all figures previously "drawn" using the Graph methods (e.g. DrawText) @@ -6919,7 +7449,7 @@ Erase the Graph - Removes all figures previously "drawn" using the Graph methods Erase() ``` -#### MotionCallBack +### MotionCallBack Not a user callable method. Used to get Graph mouse motion events. Called by tkinter when mouse moved @@ -6933,7 +7463,7 @@ Parameter Descriptions: |---|---| |event|(event) event info from tkinter. Contains the x and y coordinates of a mouse| -#### Move +### 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 @@ -6948,7 +7478,7 @@ Parameter Descriptions: |x_direction|Union[int, float] how far to move in the "X" direction in your coordinates| |y_direction|Union[int, float] how far to move in the "Y" direction in your coordinates| -#### MoveFigure +### MoveFigure Moves a previously drawn figure using a "delta" from current position @@ -6966,7 +7496,7 @@ Parameter Descriptions: |x_direction|Union[int, float] delta to apply to position in the X direction| |y_direction|Union[int, float] delta to apply to position in the Y direction| -#### RelocateFigure +### 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 @@ -6985,7 +7515,7 @@ Parameter Descriptions: |x|Union[int, float] location on X axis (in user coords) to move the upper left corner of the figure| |y|Union[int, float] location on Y axis (in user coords) to move the upper left corner of the figure| -#### SendFigureToBack +### SendFigureToBack Changes Z-order of figures on the Graph. Sends the indicated figure to the back of all other drawn figures @@ -6999,7 +7529,7 @@ Parameter Descriptions: |---|---| |figure|(int) value returned by tkinter when creating the figure / drawing| -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -7013,7 +7543,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -7027,11 +7557,11 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### TKCanvas +### TKCanvas #### property: TKCanvas -#### Update +### Update Changes some of the settings for the Graph Element. Must call `Window.Read` or `Window.Finalize` prior @@ -7046,7 +7576,266 @@ Parameter Descriptions: |background_color|color of background| |visible|(bool) control visibility of element| -#### erase +### 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: + +|Name|Meaning| +|---|---| +|figure|(int) value returned by tkinter when creating the figure / drawing| + +### button_press_call_back + +Not a user callable method. Used to get Graph click events. Called by tkinter when button is released + +``` +button_press_call_back(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(event) event info from tkinter. Contains the x and y coordinates of a click| + +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### button_release_call_back + +Not a user callable method. Used to get Graph click events. Called by tkinter when button is released + +``` +button_release_call_back(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(event) event info from tkinter. Note not used in this method| + +### 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: + +|Name|Meaning| +|---|---| +|id|(int) 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 + +``` +draw_arc(top_left, + bottom_right, + extent, + start_angle, + style=None, + arc_color="black") +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|top_left|Union[Tuple[int, int], Tuple[float, float]] the top left point of bounding rectangle| +|bottom_right|Union[Tuple[int, int], Tuple[float, float]] the bottom right point of bounding rectangle| +|extent|(float) Andle to end drawing. Used in conjunction with start_angle| +|start_angle|(float) Angle to begin drawing. Used in conjunction with extent| +|style|(str) Valid choices are One of these Style strings- 'pieslice', 'chord', 'arc', 'first', 'last', 'butt', 'projecting', 'round', 'bevel', 'miter'| +|arc_color|(str) color to draw arc with| +||| +| **return** | Union[int, None] 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 + +``` +draw_circle(center_location, + radius, + fill_color=None, + line_color="black") +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|center_location|Union [Tuple[int, int], Tuple[float, float]] Center location using USER'S coordinate system| +|radius|Union[int, float] Radius in user's coordinate values.| +|fill_color|(str) color of the point to draw| +|line_color|(str) color of the outer line that goes around the circle (sorry, can't set thickness)| +||| +| **return** | Union[int, None] 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 + +``` +draw_image(filename=None, + data=None, + location=(None, None), + color="black", + font=None, + angle=0) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|filename|(str) if image is in a file, path and filename for the image. (GIF and PNG only!)| +|data|Union[str, bytes] if image is in Base64 format or raw? format then use instead of filename| +|location|Union[Tuple[int, int], Tuple[float, float]] the (x,y) location to place image's top left corner| +|color|(str) text color| +|font|Union[str, Tuple[str, int]] specifies the font family, size, etc| +|angle|(float) Angle 0 to 360 to draw the text. Zero represents horizontal text| +||| +| **return** | Union[int, None] 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 + +``` +draw_line(point_from, + point_to, + color="black", + width=1) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|point_from|Union[Tuple[int, int], Tuple[float, float]] Starting point for line| +|point_to|Union[Tuple[int, int], Tuple[float, float]] Ending point for line| +|color|(str) Color of the line| +|width|(int) width of line in pixels| +||| +| **return** | Union[int, None] id returned from tktiner or None if user closed the window. id is used when you
want to manipulate the line | + +### draw_oval + +Draws an oval based on coordinates in user coordinate system. Provide the location of a "bounding rectangle" + +``` +draw_oval(top_left, + bottom_right, + fill_color=None, + line_color=None) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|top_left|Union[Tuple[int, int], Tuple[float, float]] the top left point of bounding rectangle| +|bottom_right|Union[Tuple[int, int], Tuple[float, float]] the bottom right point of bounding rectangle| +|fill_color|(str) color of the interrior| +|line_color|(str) color of outline of oval| +||| +| **return** | Union[int, None] 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 + +``` +draw_point(point, + size=2, + color="black") +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|point|Union [Tuple[int, int], Tuple[float, float]] Center location using USER'S coordinate system| +|size|Union[int, float] Radius? (Or is it the diameter?) in user's coordinate values.| +|color|(str) color of the point to draw| +||| +| **return** | Union[int, None] id returned from tkinter that you'll need if you want to manipulate the point | + +### draw_rectangle + +Draw a rectangle given 2 points. Can control the line and fill colors + +``` +draw_rectangle(top_left, + bottom_right, + fill_color=None, + line_color=None, + line_width=None) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|top_left|Union[Tuple[int, int], Tuple[float, float]] the top left point of rectangle| +|bottom_right|Union[Tuple[int, int], Tuple[float, float]] the bottom right point of rectangle| +|fill_color|(str) color of the interior| +|line_color|(str) color of outline| +||| +| **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 + +``` +draw_text(text, + location, + color="black", + font=None, + angle=0, + text_location="center") +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|text|(str) text to display| +|location|Union[Tuple[int, int], Tuple[float, float]] location to place first letter| +|color|(str) text color| +|font|Union[str, Tuple[str, int]] specifies the font family, size, etc| +|angle|(float) Angle 0 to 360 to draw the text. Zero represents horizontal text| +|text_location|(enum) "anchor" location for the text. Values start with TEXT_LOCATION_| +||| +| **return** | Union[int, None] 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) @@ -7054,7 +7843,7 @@ Erase the Graph - Removes all figures previously "drawn" using the Graph methods erase() ``` -#### expand +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -7069,7 +7858,40 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### move +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### motion_call_back + +Not a user callable method. Used to get Graph mouse motion events. Called by tkinter when mouse moved + +``` +motion_call_back(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(event) event info from tkinter. Contains the x and y coordinates of a mouse| + +### 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 @@ -7084,7 +7906,114 @@ Parameter Descriptions: |x_direction|Union[int, float] how far to move in the "X" direction in your coordinates| |y_direction|Union[int, float] how far to move in the "Y" direction in your coordinates| -#### update +### move_figure + +Moves a previously drawn figure using a "delta" from current position + +``` +move_figure(figure, + x_direction, + y_direction) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|figure|(id) Previously obtained figure-id. These are returned from all Draw methods| +|x_direction|Union[int, float] delta to apply to position in the X direction| +|y_direction|Union[int, float] 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 + +``` +relocate_figure(figure, + x, + y) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|figure|(id) Previously obtained figure-id. These are returned from all Draw methods| +|x|Union[int, float] location on X axis (in user coords) to move the upper left corner of the figure| +|y|Union[int, float] 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: + +|Name|Meaning| +|---|---| +|figure|(int) value returned by tkinter when creating the figure / drawing| + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### tk_canvas + +#### property: tk_canvas + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Graph Element. Must call `Window.Read` or `Window.Finalize` prior @@ -7099,7 +8028,7 @@ Parameter Descriptions: |background_color|color of background| |visible|(bool) control visibility of element| -### Image Element +## Image Element Image Element - show an image in the window. Should be a GIF or a PNG only @@ -7133,7 +8062,7 @@ Parameter Descriptions: |enable_events|(bool) Turns on the element specific events. For an Image element, the event is "image clicked"| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -7149,7 +8078,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -7163,7 +8092,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -7177,7 +8106,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Image Element. Must call `Window.Read` or `Window.Finalize` prior @@ -7193,11 +8122,11 @@ Parameter Descriptions: |Name|Meaning| |---|---| |filename|(str) filename to the new image to display.| -|data|(str) Base64 encoded string| +|data|Union[str, tkPhotoImage] Base64 encoded string OR a tk.PhotoImage object| |size|Tuple[int,int] size of a image (w,h) w=characters-wide, h=rows-high| |visible|(bool) control visibility of element| -#### UpdateAnimation +### 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 @@ -7213,7 +8142,23 @@ Parameter Descriptions: |source|Union[str,bytes] Filename or Base64 encoded string containing Animated GIF| |time_between_frames|(int) Number of milliseconds to wait between showing frames| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -7228,7 +8173,78 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Image Element. Must call `Window.Read` or `Window.Finalize` prior @@ -7244,11 +8260,27 @@ Parameter Descriptions: |Name|Meaning| |---|---| |filename|(str) filename to the new image to display.| -|data|(str) Base64 encoded string| +|data|Union[str, tkPhotoImage] Base64 encoded string OR a tk.PhotoImage object| |size|Tuple[int,int] size of a image (w,h) w=characters-wide, h=rows-high| |visible|(bool) control visibility of element| -### InputText 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 + +``` +update_animation(source, time_between_frames=0) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|source|Union[str,bytes] Filename or Base64 encoded string containing Animated GIF| +|time_between_frames|(int) Number of milliseconds to wait between showing frames| + +## InputText Element Display a single text input field. Based on the tkinter Widget `Entry` @@ -7296,7 +8328,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element (Default = True)| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -7312,7 +8344,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### Get +### Get Read and return the current value of the input element. Must call `Window.Read` or `Window.Finalize` prior @@ -7322,7 +8354,7 @@ Read and return the current value of the input element. Must call `Window.Read` |---|---| | **return** | (str) current value of Input field or '' if error encountered | -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -7336,7 +8368,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -7350,7 +8382,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Input Element. Must call `Window.Read` or `Window.Finalize` prior @@ -7376,7 +8408,23 @@ Parameter Descriptions: |background_color|(str) change color of the background| |move_cursor_to|Union[int, str] Moves the cursor to a particular offset. Defaults to 'end'| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -7391,7 +8439,7 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### get +### get Read and return the current value of the input element. Must call `Window.Read` or `Window.Finalize` prior @@ -7401,7 +8449,78 @@ Read and return the current value of the input element. Must call `Window.Read` |---|---| | **return** | (str) current value of Input field or '' if error encountered | -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Input Element. Must call `Window.Read` or `Window.Finalize` prior @@ -7427,7 +8546,7 @@ Parameter Descriptions: |background_color|(str) change color of the background| |move_cursor_to|Union[int, str] Moves the cursor to a particular offset. Defaults to 'end'| -### Listbox Element +## 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. @@ -7477,7 +8596,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -7493,7 +8612,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### GetIndexes +### GetIndexes Returns the items currently selected as a list of indexes @@ -7503,7 +8622,7 @@ Returns the items currently selected as a list of indexes |---|---| | **return** | List[int] A list of offsets into values that is currently selected | -#### GetListValues +### GetListValues Returns list of Values provided by the user in the user's format @@ -7513,7 +8632,7 @@ Returns list of Values provided by the user in the user's format |---|---| | **return** | List[Any]. List of values. Can be any / mixed types -> [] | -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -7527,7 +8646,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -7541,7 +8660,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### SetValue +### SetValue Set listbox highlighted choices @@ -7555,7 +8674,7 @@ Parameter Descriptions: |---|---| |values|List[Any] new values to choose based on previously set values| -#### Update +### Update Changes some of the settings for the Listbox Element. Must call `Window.Read` or `Window.Finalize` prior @@ -7577,7 +8696,23 @@ Parameter Descriptions: |scroll_to_index|(int) scroll the listbox so that this index is the first shown| |visible|(bool) control visibility of element| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -7592,7 +8727,112 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### update +### get_indexes + +Returns the items currently selected as a list of indexes + +`get_indexes()` + +|Name|Meaning| +|---|---| +| **return** | List[int] 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()` + +|Name|Meaning| +|---|---| +| **return** | List[Any]. 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### set_value + +Set listbox highlighted choices + +``` +set_value(values) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|values|List[Any] new values to choose based on previously set values| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Listbox Element. Must call `Window.Read` or `Window.Finalize` prior @@ -7614,7 +8854,7 @@ Parameter Descriptions: |scroll_to_index|(int) scroll the listbox so that this index is the first shown| |visible|(bool) control visibility of element| -### Menu Element +## Menu Element Menu Element is the Element that provides a Menu Bar that goes across the top of the window, just below titlebar. Here is an example layout. The "&" are shortcut keys ALT+key. @@ -7655,7 +8895,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -7671,7 +8911,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -7685,7 +8925,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -7699,7 +8939,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Update a menubar - can change the menu definition and visibility. The entire menu has to be specified @@ -7714,7 +8954,23 @@ Parameter Descriptions: |menu_definition|List[List[Tuple[str, List[str]]]| |visible|(bool) control visibility of element| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -7729,7 +8985,78 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Update a menubar - can change the menu definition and visibility. The entire menu has to be specified @@ -7744,7 +9071,7 @@ Parameter Descriptions: |menu_definition|List[List[Tuple[str, List[str]]]| |visible|(bool) control visibility of element| -### Multiline 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 @@ -7798,7 +9125,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -7814,7 +9141,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### Get +### Get Return current contents of the Multiline Element @@ -7824,7 +9151,7 @@ Return current contents of the Multiline Element |---|---| | **return** | (str) current contents of the Multiline Element (used as an input type of Multiline | -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -7838,7 +9165,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -7852,7 +9179,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Multiline Element. Must call `Window.Read` or `Window.Finalize` prior @@ -7880,7 +9207,23 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |autoscroll|(bool) if True then contents of element are scrolled down when new text is added to the end| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -7895,7 +9238,7 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### get +### get Return current contents of the Multiline Element @@ -7905,7 +9248,78 @@ Return current contents of the Multiline Element |---|---| | **return** | (str) current contents of the Multiline Element (used as an input type of Multiline | -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Multiline Element. Must call `Window.Read` or `Window.Finalize` prior @@ -7933,7 +9347,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |autoscroll|(bool) if True then contents of element are scrolled down when new text is added to the end| -### OptionMenu Element +## 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 @@ -7972,7 +9386,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -7988,7 +9402,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -8002,7 +9416,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -8016,7 +9430,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the OptionMenu Element. Must call `Window.Read` or `Window.Finalize` prior @@ -8036,7 +9450,23 @@ Parameter Descriptions: |disabled|(bool) disable or enable state of the element| |visible|(bool) control visibility of element| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -8051,7 +9481,78 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the OptionMenu Element. Must call `Window.Read` or `Window.Finalize` prior @@ -8071,7 +9572,7 @@ Parameter Descriptions: |disabled|(bool) disable or enable state of the element| |visible|(bool) control visibility of element| -### Output Element +## Output Element Output Element - a multi-lined text area where stdout and stderr are re-routed to. @@ -8103,7 +9604,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -8119,7 +9620,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### Get +### Get Returns the current contents of the output. Similar to Get method other Elements @@ -8129,7 +9630,7 @@ Returns the current contents of the output. Similar to Get method other Element |---|---| | **return** | (str) the current value of the output | -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -8143,7 +9644,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -8157,7 +9658,11 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### TKOut + +#### property: TKOut + +### Update Changes some of the settings for the Output Element. Must call `Window.Read` or `Window.Finalize` prior @@ -8172,7 +9677,23 @@ Parameter Descriptions: |value|(str) string that will replace current contents of the output area| |visible|(bool) control visibility of element| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -8187,7 +9708,82 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### tk_out + +#### property: tk_out + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Output Element. Must call `Window.Read` or `Window.Finalize` prior @@ -8202,7 +9798,7 @@ Parameter Descriptions: |value|(str) string that will replace current contents of the output area| |visible|(bool) control visibility of element| -### Pane Element +## Pane Element A sliding Pane that is unique to tkinter. Uses Columns to create individual panes @@ -8238,7 +9834,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -8254,7 +9850,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -8268,7 +9864,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -8282,7 +9878,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Pane Element. Must call `Window.Read` or `Window.Finalize` prior @@ -8296,7 +9892,23 @@ Parameter Descriptions: |---|---| |visible|(bool) control visibility of element| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -8311,7 +9923,78 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Pane Element. Must call `Window.Read` or `Window.Finalize` prior @@ -8325,7 +10008,7 @@ Parameter Descriptions: |---|---| |visible|(bool) control visibility of element| -### ProgressBar Element +## ProgressBar Element Progress Bar Element - Displays a colored bar that is shaded as progress of some operation is made @@ -8361,7 +10044,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -8377,7 +10060,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -8391,7 +10074,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -8405,7 +10088,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the ProgressBar Element. Must call `Window.Read` or `Window.Finalize` prior @@ -8419,7 +10102,7 @@ Parameter Descriptions: |---|---| |visible|(bool) control visibility of element| -#### UpdateBar +### UpdateBar Change what the bar shows by changing the current count and optionally the max count @@ -8434,7 +10117,23 @@ Parameter Descriptions: |current_count|(int) sets the current value| |max|(int) changes the max value| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -8449,7 +10148,78 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the ProgressBar Element. Must call `Window.Read` or `Window.Finalize` prior @@ -8463,7 +10233,22 @@ Parameter Descriptions: |---|---| |visible|(bool) control visibility of element| -### Radio 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: + +|Name|Meaning| +|---|---| +|current_count|(int) sets the current value| +|max|(int) 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. @@ -8508,7 +10293,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -8524,7 +10309,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### Get +### Get A snapshot of the value of Radio Button -> (bool) @@ -8534,7 +10319,7 @@ A snapshot of the value of Radio Button -> (bool) |---|---| | **return** | (bool) True if this radio button is selected | -#### ResetGroup +### ResetGroup Sets all Radio Buttons in the group to not selected @@ -8542,7 +10327,7 @@ Sets all Radio Buttons in the group to not selected ResetGroup() ``` -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -8556,7 +10341,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -8570,7 +10355,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Radio Button Element. Must call `Window.Read` or `Window.Finalize` prior @@ -8588,7 +10373,23 @@ Parameter Descriptions: |disabled|(bool) disable or enable state of the element| |visible|(bool) control visibility of element| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -8603,7 +10404,7 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### get +### get A snapshot of the value of Radio Button -> (bool) @@ -8613,7 +10414,86 @@ A snapshot of the value of Radio Button -> (bool) |---|---| | **return** | (bool) True if this radio button is selected | -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### reset_group + +Sets all Radio Buttons in the group to not selected + +```python +reset_group() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Radio Button Element. Must call `Window.Read` or `Window.Finalize` prior @@ -8631,7 +10511,7 @@ Parameter Descriptions: |disabled|(bool) disable or enable state of the element| |visible|(bool) control visibility of element| -### Slider Element +## Slider Element A slider, horizontal or vertical @@ -8683,7 +10563,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -8699,7 +10579,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -8713,7 +10593,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -8727,7 +10607,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Slider Element. Must call `Window.Read` or `Window.Finalize` prior @@ -8747,7 +10627,23 @@ Parameter Descriptions: |disabled|(bool) disable or enable state of the element| |visible|(bool) control visibility of element| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -8762,7 +10658,78 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Slider Element. Must call `Window.Read` or `Window.Finalize` prior @@ -8782,7 +10749,7 @@ Parameter Descriptions: |disabled|(bool) disable or enable state of the element| |visible|(bool) control visibility of element| -### Spin Element +## Spin Element A spinner with up/down buttons and a single line of text. Choose 1 values from list @@ -8824,7 +10791,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -8840,7 +10807,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### Get +### 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 @@ -8852,7 +10819,7 @@ item returned will be an int (not a string) |---|---| | **return** | (Any) The currently visible entry | -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -8866,7 +10833,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -8880,7 +10847,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Spin Element. Must call `Window.Read` or `Window.Finalize` prior @@ -8900,7 +10867,23 @@ Parameter Descriptions: |disabled|(bool) disable or enable state of the element| |visible|(bool) control visibility of element| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -8915,7 +10898,7 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### get +### 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 @@ -8927,7 +10910,78 @@ item returned will be an int (not a string) |---|---| | **return** | (Any) The currently visible entry | -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Spin Element. Must call `Window.Read` or `Window.Finalize` prior @@ -8947,7 +11001,7 @@ Parameter Descriptions: |disabled|(bool) disable or enable state of the element| |visible|(bool) control visibility of element| -### StatusBar Element +## StatusBar Element A StatusBar Element creates the sunken text-filled strip at the bottom. Many Windows programs have this line @@ -8989,7 +11043,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -9005,7 +11059,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -9019,7 +11073,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -9033,7 +11087,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Status Bar Element. Must call `Window.Read` or `Window.Finalize` prior @@ -9055,7 +11109,23 @@ Parameter Descriptions: |font|Union[str, Tuple[str, int]] specifies the font family, size, etc| |visible|(bool) set visibility state of the element| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -9070,7 +11140,78 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Status Bar Element. Must call `Window.Read` or `Window.Finalize` prior @@ -9092,7 +11233,7 @@ Parameter Descriptions: |font|Union[str, Tuple[str, int]] specifies the font family, size, etc| |visible|(bool) set visibility state of the element| -### Tab Element +## 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 @@ -9133,7 +11274,7 @@ Parameter Descriptions: |element_justification|(str) All elements inside the Tab will have this justification 'left', 'right', 'center' are valid values| |metadata|(Any) User metadata that can be set to ANYTHING| -#### AddRow +### AddRow Not recommended use call. Used to add rows of Elements to the Frame Element. @@ -9147,7 +11288,7 @@ Parameter Descriptions: |---|---| |*args|List[Element] The list of elements for this row| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -9163,7 +11304,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### Layout +### Layout Not user callable. Use layout parameter instead. Creates the layout using the supplied rows of Elements @@ -9179,7 +11320,7 @@ Parameter Descriptions: ||| | **return** | (Tab) used for chaining | -#### Select +### Select Create a tkinter event that mimics user clicking on a tab. Must have called window.Finalize / Read first! @@ -9187,7 +11328,7 @@ Create a tkinter event that mimics user clicking on a tab. Must have called wind Select() ``` -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -9201,7 +11342,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -9215,7 +11356,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Tab Element. Must call `Window.Read` or `Window.Finalize` prior @@ -9230,7 +11371,37 @@ Parameter Descriptions: |disabled|(bool) disable or enable state of the element| |visible|(bool) control visibility of element| -#### expand +### add_row + +Not recommended use call. Used to add rows of Elements to the Frame Element. + +``` +add_row(args) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|*args|List[Element] The list of elements for this row| + +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -9245,7 +11416,26 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### layout +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### layout Not user callable. Use layout parameter instead. Creates the layout using the supplied rows of Elements @@ -9261,7 +11451,7 @@ Parameter Descriptions: ||| | **return** | (Tab) used for chaining | -#### select +### select Create a tkinter event that mimics user clicking on a tab. Must have called window.Finalize / Read first! @@ -9269,7 +11459,59 @@ Create a tkinter event that mimics user clicking on a tab. Must have called wind select() ``` -#### update +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Tab Element. Must call `Window.Read` or `Window.Finalize` prior @@ -9284,7 +11526,7 @@ Parameter Descriptions: |disabled|(bool) disable or enable state of the element| |visible|(bool) control visibility of element| -### TabGroup Element +## TabGroup Element TabGroup Element groups together your tabs into the group of tabs you see displayed in your window @@ -9326,7 +11568,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### AddRow +### AddRow Not recommended user call. Used to add rows of Elements to the Frame Element. @@ -9340,7 +11582,7 @@ Parameter Descriptions: |---|---| |*args|List[Element] The list of elements for this row| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -9356,7 +11598,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### FindKeyFromTabName +### FindKeyFromTabName Searches through the layout to find the key that matches the text on the tab. Implies names should be unique @@ -9372,7 +11614,7 @@ Parameter Descriptions: ||| | **return** | Union[key, None] Returns the key or None if no key found | -#### Get +### 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. @@ -9385,7 +11627,7 @@ are using this method correctly? |---|---| | **return** | Union[Any, None] The key of the currently selected tab or the tab's text if it has no key | -#### Layout +### Layout Can use like the Window.Layout method, but it's better to use the layout parameter when creating @@ -9401,7 +11643,7 @@ Parameter Descriptions: ||| | **return** | (Frame) Used for chaining | -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -9415,7 +11657,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -9429,7 +11671,37 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### expand +### add_row + +Not recommended user call. Used to add rows of Elements to the Frame Element. + +``` +add_row(args) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|*args|List[Element] The list of elements for this row| + +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -9444,7 +11716,23 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### get +### 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: + +|Name|Meaning| +|---|---| +|tab_name|| +||| +| **return** | Union[key, None] 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. @@ -9457,7 +11745,26 @@ are using this method correctly? |---|---| | **return** | Union[Any, None] The key of the currently selected tab or the tab's text if it has no key | -#### layout +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### layout Can use like the Window.Layout method, but it's better to use the layout parameter when creating @@ -9473,7 +11780,59 @@ Parameter Descriptions: ||| | **return** | (Frame) Used for chaining | -### Table Element +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +## Table Element ``` Table(values, @@ -9541,7 +11900,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -9557,7 +11916,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### Get +### 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 @@ -9569,7 +11928,7 @@ user when Table was created or Updated. |---|---| | **return** | List[List[Any]] the current table values (for now what was originally provided up updated) | -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -9583,7 +11942,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -9597,7 +11956,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Table Element. Must call `Window.Read` or `Window.Finalize` prior @@ -9621,7 +11980,23 @@ Parameter Descriptions: |alternating_row_color|(str) the color to make every other row| |row_colors|List[Union[Tuple[int, str], Tuple[Int, str, str]] 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)| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -9636,7 +12011,7 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### get +### 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 @@ -9648,7 +12023,108 @@ user when Table was created or Updated. |---|---| | **return** | List[List[Any]] the current table values (for now what was originally provided up updated) | -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### treeview_double_click + +Not user callable. Callback function that is called when something is selected from Table. +Stores the selected rows in Element as they are being selected. If events enabled, then returns from Read + +``` +treeview_double_click(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) event information from tkinter| + +### treeview_selected + +Not user callable. Callback function that is called when something is selected from Table. +Stores the selected rows in Element as they are being selected. If events enabled, then returns from Read + +``` +treeview_selected(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) event information from tkinter| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Table Element. Must call `Window.Read` or `Window.Finalize` prior @@ -9672,7 +12148,7 @@ Parameter Descriptions: |alternating_row_color|(str) the color to make every other row| |row_colors|List[Union[Tuple[int, str], Tuple[Int, str, str]] 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 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. @@ -9718,7 +12194,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -9734,7 +12210,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -9748,7 +12224,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -9762,7 +12238,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Text Element. Must call `Window.Read` or `Window.Finalize` prior @@ -9784,7 +12260,23 @@ Parameter Descriptions: |font|Union[str, Tuple[str, int]] specifies the font family, size, etc| |visible|(bool) set visibility state of the element| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -9799,7 +12291,78 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Text Element. Must call `Window.Read` or `Window.Finalize` prior @@ -9821,7 +12384,7 @@ Parameter Descriptions: |font|Union[str, Tuple[str, int]] specifies the font family, size, etc| |visible|(bool) set visibility state of the element| -### Tree 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. @@ -9882,7 +12445,7 @@ Parameter Descriptions: |visible|(bool) set visibility state of the element| |metadata|(Any) User metadata that can be set to ANYTHING| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -9898,7 +12461,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -9912,7 +12475,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -9926,7 +12489,7 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### Update +### Update Changes some of the settings for the Tree Element. Must call `Window.Read` or `Window.Finalize` prior @@ -9950,7 +12513,37 @@ Parameter Descriptions: |icon|Union[bytes, str] can be either a base64 icon or a filename for the icon| |visible|(bool) control visibility of element| -#### expand +### add_treeview_data + +Not a user function. Recursive method that inserts tree data into the tkinter treeview widget. + +``` +add_treeview_data(node) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|node|(TreeData) The node to insert. Will insert all nodes from starting point downward, recursively| + +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -9965,7 +12558,93 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -#### update +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### treeview_selected + +Not a user function. Callback function that happens when an item is selected from the tree. In this +method, it saves away the reported selections so they can be properly returned. + +``` +treeview_selected(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(Any) An event parameter passed in by tkinter. Not used| + +### 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. + +```python +unhide_row() +``` + +### update Changes some of the settings for the Tree Element. Must call `Window.Read` or `Window.Finalize` prior @@ -9989,7 +12668,7 @@ Parameter Descriptions: |icon|Union[bytes, str] can be either a base64 icon or a filename for the icon| |visible|(bool) control visibility of element| -### TreeData Element +## TreeData 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 @@ -10001,7 +12680,7 @@ Instantiate the object, initializes the Tree Data, creates a root node for you TreeData() ``` -#### Insert +### 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 @@ -10024,7 +12703,42 @@ Parameter Descriptions: |values|List[Any] The list of values that are displayed at this node| |icon|Union[str, bytes]| -### VerticalSeparator Element +### Node + +Contains information about the individual node in the tree + +``` +Node(parent, + key, + text, + values, + 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 + +``` +insert(parent, + key, + text, + values, + icon=None) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|parent|(Node) the parent Node| +|key|(Any) Used to uniquely identify this node| +|text|(str) The text that is displayed at this node's location| +|values|List[Any] The list of values that are displayed at this node| +|icon|Union[str, bytes]| + +## 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 @@ -10039,7 +12753,7 @@ Parameter Descriptions: |---|---| |pad|(int, int) or ((int, int),(int,int)) Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom))| -#### ButtonReboundCallback +### ButtonReboundCallback Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button @@ -10055,7 +12769,7 @@ Parameter Descriptions: |---|---| |event|(unknown) Not used in this function.| -#### SetFocus +### SetFocus Sets the current focus to be on this element @@ -10069,7 +12783,7 @@ Parameter Descriptions: |---|---| |force|(bool) if True will call focus_force otherwise calls focus_set| -#### SetTooltip +### 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'). @@ -10083,7 +12797,23 @@ Parameter Descriptions: |---|---| |tooltip_text|(str) the text to show in tooltip.| -#### expand +### button_rebound_callback + +Used in combination with tkinter's widget.bind function. If you wish to have a double-click for a button to call back the button's normal +callback routine, then you should target your call to tkinter's bind method to point to this function which will in turn call the button +callback function that is normally called. + +``` +button_rebound_callback(event) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|event|(unknown) Not used in this function.| + +### expand Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions @@ -10098,7 +12828,78 @@ Parameter Descriptions: |expand_x|(Bool) If True Element will expand in the Horizontal directions| |expand_y|(Bool) If True Element will expand in the Vertical directions| -### Window +### 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()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[int, int] - Width, 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 + +```python +hide_row() +``` + +### set_focus + +Sets the current focus to be on this element + +``` +set_focus(force=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|force|(bool) 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. + +``` +set_size(size=(None, None)) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|size|Tuple[int, int] 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: + +|Name|Meaning| +|---|---| +|tooltip_text|(str) the text to show in tooltip.| + +### 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. + +```python +unhide_row() +``` + +## Window Represents a single Window @@ -10180,7 +12981,7 @@ Parameter Descriptions: |element_justification|(str) All elements in the Window itself will have this justification 'left', 'right', 'center' are valid values| |metadata|(Any) User metadata that can be set to ANYTHING| -#### AddRow +### 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. @@ -10196,7 +12997,7 @@ Parameter Descriptions: |---|---| |*args|List[Elements]| -#### AddRows +### 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 @@ -10212,7 +13013,7 @@ Parameter Descriptions: |---|---| |rows|List[List[Elements]] A list of a list of elements| -#### AlphaChannel +### AlphaChannel #### property: AlphaChannel @@ -10222,7 +13023,7 @@ A property that changes the current alpha channel value (internal value) |---|---| | **return** | (float) the current alpha channel setting according to self, not read directly from tkinter | -#### BringToFront +### BringToFront Brings this window to the top of all other windows (perhaps may not be brought before a window made to "stay on top") @@ -10231,7 +13032,7 @@ Brings this window to the top of all other windows (perhaps may not be brought b BringToFront() ``` -#### Close +### 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. @@ -10240,7 +13041,7 @@ Closes window. Users can safely call even if window has been destroyed. Shoul Close() ``` -#### CurrentLocation +### CurrentLocation Get the current location of the window's top left corner @@ -10250,7 +13051,7 @@ Get the current location of the window's top left corner |---|---| | **return** | Tuple[(int), (int)] The x and y location in tuple form (x,y) | -#### Disable +### Disable Disables window from taking any input from the user @@ -10258,7 +13059,7 @@ Disables window from taking any input from the user Disable() ``` -#### DisableDebugger +### DisableDebugger Disable the internal debugger. By default the debugger is ENABLED @@ -10266,7 +13067,7 @@ Disable the internal debugger. By default the debugger is ENABLED DisableDebugger() ``` -#### Disappear +### 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 @@ -10276,7 +13077,7 @@ Causes a window to "disappear" from the screen, but remain on the taskbar. It do Disappear() ``` -#### Elem +### Elem Find element object associated with the provided key. THIS METHOD IS NO LONGER NEEDED to be called by the user @@ -10310,7 +13111,7 @@ Parameter Descriptions: ||| | **return** | Union[Element, Error Element, None] 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 +### Element Find element object associated with the provided key. THIS METHOD IS NO LONGER NEEDED to be called by the user @@ -10344,7 +13145,7 @@ Parameter Descriptions: ||| | **return** | Union[Element, Error Element, None] 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 +### Enable Re-enables window to take user input after having it be Disabled previously @@ -10352,7 +13153,7 @@ Re-enables window to take user input after having it be Disabled previously Enable() ``` -#### EnableDebugger +### EnableDebugger Enables the internal debugger. By default, the debugger IS enabled @@ -10360,7 +13161,7 @@ Enables the internal debugger. By default, the debugger IS enabled EnableDebugger() ``` -#### Fill +### Fill Fill in elements that are input fields with data based on a 'values dictionary' @@ -10376,7 +13177,7 @@ Parameter Descriptions: ||| | **return** | (Window) returns self so can be chained with other methods | -#### Finalize +### 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. @@ -10388,7 +13189,7 @@ Lots of action! |---|---| | **return** | (Window) Returns 'self' so that method "Chaining" can happen (read up about it as it's very cool!) | -#### Find +### Find Find element object associated with the provided key. THIS METHOD IS NO LONGER NEEDED to be called by the user @@ -10422,7 +13223,7 @@ Parameter Descriptions: ||| | **return** | Union[Element, Error Element, None] 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 +### FindElement Find element object associated with the provided key. THIS METHOD IS NO LONGER NEEDED to be called by the user @@ -10456,7 +13257,7 @@ Parameter Descriptions: ||| | **return** | Union[Element, Error Element, None] 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 +### FindElementWithFocus Returns the Element that currently has focus as reported by tkinter. If no element is found None is returned! @@ -10466,7 +13267,7 @@ Returns the Element that currently has focus as reported by tkinter. If no eleme |---|---| | **return** | Union[Element, None] An Element if one has been found with focus or None if no element found | -#### GetScreenDimensions +### GetScreenDimensions Get the screen dimensions. NOTE - you must have a window already open for this to work (blame tkinter not me) @@ -10476,7 +13277,7 @@ Get the screen dimensions. NOTE - you must have a window already open for this |---|---| | **return** | Union[Tuple[None, None], Tuple[width, height]] Tuple containing width and height of screen in pixels | -#### GrabAnyWhereOff +### 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. @@ -10485,7 +13286,7 @@ Turns off Grab Anywhere functionality AFTER a window has been created. Don't tr GrabAnyWhereOff() ``` -#### GrabAnyWhereOn +### 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. @@ -10494,7 +13295,7 @@ Turns on Grab Anywhere functionality AFTER a window has been created. Don't try GrabAnyWhereOn() ``` -#### Hide +### Hide Hides the window from the screen and the task bar @@ -10502,7 +13303,7 @@ Hides the window from the screen and the task bar Hide() ``` -#### Layout +### 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 @@ -10521,7 +13322,7 @@ Parameter Descriptions: ||| | **return** | (Window} self so that you can chain method calls | -#### LoadFromDisk +### LoadFromDisk Restore values from a previous call to SaveToDisk which saves the returned values dictionary in Pickle format @@ -10535,7 +13336,7 @@ Parameter Descriptions: |---|---| |filename|(str) Pickle Filename to load| -#### Maximize +### 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" @@ -10545,7 +13346,7 @@ Maximize the window. This is done differently on a windows system versus a linux Maximize() ``` -#### Minimize +### Minimize Minimize this window to the task bar @@ -10553,7 +13354,7 @@ Minimize this window to the task bar Minimize() ``` -#### Move +### Move Move the upper left corner of this window to the x,y coordinates provided @@ -10568,7 +13369,7 @@ Parameter Descriptions: |x|(int) x coordinate in pixels| |y|(int) y coordinate in pixels| -#### Normal +### Normal Restore a window to a non-maximized state. Does different things depending on platform. See Maximize for more. @@ -10576,7 +13377,7 @@ Restore a window to a non-maximized state. Does different things depending on p Normal() ``` -#### Read +### 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 @@ -10595,7 +13396,7 @@ Parameter Descriptions: ||| | **return** | Tuple[(Any), Union[Dict[Any:Any]], List[Any], None] (event, values)
(event or timeout_key or None, Dictionary of values or List of values from all elements in the Window) | -#### Reappear +### Reappear Causes a window previously made to "Disappear" (using that method). Does this by restoring the alpha channel @@ -10603,7 +13404,7 @@ Causes a window previously made to "Disappear" (using that method). Does this by Reappear() ``` -#### Refresh +### 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). @@ -10615,7 +13416,7 @@ Without this call your changes to a Window will not be visible to the user until |---|---| | **return** | (Window) `self` so that method calls can be easily "chained" | -#### SaveToDisk +### 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 @@ -10630,7 +13431,7 @@ Parameter Descriptions: |---|---| |filename|(str) Filename to save the values to in pickled form| -#### SetAlpha +### SetAlpha Sets the Alpha Channel for a window. Values are between 0 and 1 where 0 is completely transparent @@ -10644,7 +13445,7 @@ Parameter Descriptions: |---|---| |alpha|(float) 0 to 1. 0 is completely transparent. 1 is completely visible and solid (can't see through)| -#### SetIcon +### SetIcon Sets the icon that is shown on the title bar and on the task bar. Can pass in: * a filename which must be a .ICO icon file for windows @@ -10662,7 +13463,7 @@ Parameter Descriptions: |icon|(str) Filename or bytes object| |pngbase64|(str) Base64 encoded GIF or PNG file| -#### SetTransparentColor +### SetTransparentColor Set the color that will be transparent in your window. Areas with this color will be SEE THROUGH. @@ -10676,9 +13477,7 @@ Parameter Descriptions: |---|---| |color|(str) Color string that defines the transparent color| -#### Size - -Note the `Window.Size` can be used for both reading and writing +### Size #### property: Size @@ -10688,7 +13487,7 @@ Return the current size of the window in pixels |---|---| | **return** | Tuple[(int), (int)] the (width, height) of the window | -#### UnHide +### UnHide Used to bring back a window that was previously hidden using the Hide method @@ -10696,7 +13495,7 @@ Used to bring back a window that was previously hidden using the Hide method UnHide() ``` -#### VisibilityChanged +### 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. @@ -10707,7 +13506,58 @@ call and then have that same source run on plain PySimpleGUI. |---|---| | **return** | | -#### close +### 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) + +``` +add_row(args) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|*args|List[Elements]| + +### 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. + +``` +add_rows(rows) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|rows|List[List[Elements]] A list of a list of elements| + +### alpha_channel + +#### property: alpha_channel + +A property that changes the current alpha channel value (internal value) + +|Name|Meaning| +|---|---| +| **return** | (float) the current alpha channel setting according to self, not read directly from tkinter | + +### 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") + +```python +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. @@ -10716,7 +13566,17 @@ Closes window. Users can safely call even if window has been destroyed. Shoul close() ``` -#### disable +### current_location + +Get the current location of the window's top left corner + +`current_location()` + +|Name|Meaning| +|---|---| +| **return** | Tuple[(int), (int)] The x and y location in tuple form (x,y) | + +### disable Disables window from taking any input from the user @@ -10724,7 +13584,15 @@ Disables window from taking any input from the user disable() ``` -#### disappear +### 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 @@ -10734,7 +13602,7 @@ Causes a window to "disappear" from the screen, but remain on the taskbar. It do disappear() ``` -#### elem +### elem Find element object associated with the provided key. THIS METHOD IS NO LONGER NEEDED to be called by the user @@ -10768,7 +13636,7 @@ Parameter Descriptions: ||| | **return** | Union[Element, Error Element, None] 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 +### element Find element object associated with the provided key. THIS METHOD IS NO LONGER NEEDED to be called by the user @@ -10802,7 +13670,7 @@ Parameter Descriptions: ||| | **return** | Union[Element, Error Element, None] 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 +### enable Re-enables window to take user input after having it be Disabled previously @@ -10810,7 +13678,15 @@ Re-enables window to take user input after having it be Disabled previously enable() ``` -#### fill +### enable_debugger + +Enables the internal debugger. By default, the debugger IS enabled + +```python +enable_debugger() +``` + +### fill Fill in elements that are input fields with data based on a 'values dictionary' @@ -10826,7 +13702,7 @@ Parameter Descriptions: ||| | **return** | (Window) returns self so can be chained with other methods | -#### finalize +### 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. @@ -10838,7 +13714,7 @@ Lots of action! |---|---| | **return** | (Window) Returns 'self' so that method "Chaining" can happen (read up about it as it's very cool!) | -#### find +### find Find element object associated with the provided key. THIS METHOD IS NO LONGER NEEDED to be called by the user @@ -10872,7 +13748,87 @@ Parameter Descriptions: ||| | **return** | Union[Element, Error Element, None] 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 | -#### hide +### find_element + +Find element object associated with the provided key. +THIS METHOD IS NO LONGER NEEDED to be called by the user + +You can perform the same operation by writing this statement: +element = window[key] + +You can drop the entire "FindElement" function name and use [ ] instead. + +Typically used in combination with a call to element's Update method (or any other element method!): +window[key].Update(new_value) + +Versus the "old way" +window.FindElement(key).Update(new_value) + +This call can be abbreviated to any of these: +FindElement == Element == Find +Rememeber that this call will return None if no match is found which may cause your code to crash if not +checked for. + +``` +find_element(key, silent_on_error=False) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|key|(Any) Used with window.FindElement and with return values to uniquely identify this element| +|silent_on_error|(bool) If True do not display popup nor print warning of key errors| +||| +| **return** | Union[Element, Error Element, None] 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()` + +|Name|Meaning| +|---|---| +| **return** | Union[Element, None] 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()` + +|Name|Meaning| +|---|---| +| **return** | Union[Tuple[None, None], Tuple[width, height]] 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. + +```python +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. + +```python +grab_any_where_on() +``` + +### hide Hides the window from the screen and the task bar @@ -10880,7 +13836,7 @@ Hides the window from the screen and the task bar hide() ``` -#### layout +### 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 @@ -10899,7 +13855,21 @@ Parameter Descriptions: ||| | **return** | (Window} self so that you can chain method calls | -#### maximize +### 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: + +|Name|Meaning| +|---|---| +|filename|(str) 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" @@ -10909,7 +13879,7 @@ Maximize the window. This is done differently on a windows system versus a linux maximize() ``` -#### minimize +### minimize Minimize this window to the task bar @@ -10917,7 +13887,7 @@ Minimize this window to the task bar minimize() ``` -#### move +### move Move the upper left corner of this window to the x,y coordinates provided @@ -10932,7 +13902,7 @@ Parameter Descriptions: |x|(int) x coordinate in pixels| |y|(int) y coordinate in pixels| -#### normal +### normal Restore a window to a non-maximized state. Does different things depending on platform. See Maximize for more. @@ -10940,7 +13910,7 @@ Restore a window to a non-maximized state. Does different things depending on p normal() ``` -#### read +### 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 @@ -10959,7 +13929,7 @@ Parameter Descriptions: ||| | **return** | Tuple[(Any), Union[Dict[Any:Any]], List[Any], None] (event, values)
(event or timeout_key or None, Dictionary of values or List of values from all elements in the Window) | -#### reappear +### reappear Causes a window previously made to "Disappear" (using that method). Does this by restoring the alpha channel @@ -10967,7 +13937,7 @@ Causes a window previously made to "Disappear" (using that method). Does this by reappear() ``` -#### refresh +### 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). @@ -10979,7 +13949,68 @@ Without this call your changes to a Window will not be visible to the user until |---|---| | **return** | (Window) `self` so that method calls can be easily "chained" | -#### size +### 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 + +``` +save_to_disk(filename) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|filename|(str) Filename to save the values to in pickled form| + +### 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: + +|Name|Meaning| +|---|---| +|alpha|(float) 0 to 1. 0 is completely transparent. 1 is completely visible and solid (can't see through)| + +### set_icon + +Sets the icon that is shown on the title bar and on the task bar. Can pass in: +* a filename which must be a .ICO icon file for windows +* a bytes object +* a BASE64 encoded file held in a variable + +``` +set_icon(icon=None, pngbase64=None) +``` + +Parameter Descriptions: + +|Name|Meaning| +|---|---| +|icon|(str) Filename or bytes object| +|pngbase64|(str) Base64 encoded GIF or PNG file| + +### 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: + +|Name|Meaning| +|---|---| +|color|(str) Color string that defines the transparent color| + +### size #### property: size @@ -10989,6 +14020,25 @@ Return the current size of the window in pixels |---|---| | **return** | Tuple[(int), (int)] the (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()` + +|Name|Meaning| +|---|---| +| **return** | | + ``` CButton(button_text, image_filename=None, @@ -11120,8 +14170,10 @@ Parameter Descriptions: 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 -The look and feel table itself has these indexe into the dictionary LOOK_AND_FEEL_TABLE +The look and feel table itself has these indexes into the dictionary LOOK_AND_FEEL_TABLE. +The original list was (prior to a major rework and renaming)... these names still work... SystemDefault +SystemDefaultForRead Material1 Material2 Reddit @@ -11149,6 +14201,14 @@ Kayak SandyBeach TealMono +In Nov 2019 a new Theme Formula was devised to make choosing a theme easier: +The "Formula" is: +["Dark" or "Light"] Color Number +Colors can be Blue Brown Grey Green Purple Red Teal Yellow Black +The number will vary for each pair. There are more DarkGrey entries than there are LightYellow for example. +Default = The default settings (only button color is different than system default) +Default1 = The full system default including the button (everything's gray... how sad... don't be all gray... please....) + ``` ChangeLookAndFeel(index, force=False) ``` @@ -11588,8 +14648,10 @@ Parameter Descriptions: ||| | **return** | (Button) | +Get a list of the valid values to pass into your call to change_look_and_feel + ``` -ListOfLookAndFeelValues() +ListOfLookAndFeelValues() -> List[str] - list of valid string values ``` ``` @@ -11656,6 +14718,8 @@ Parameter Descriptions: ||| | **return** | (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=" ") ``` @@ -11664,8 +14728,11 @@ Parameter Descriptions: |Name|Meaning| |---|---| -|obj|| -|extra|(Default value = ' ')| +|obj|(Any) The object to display| +|extra|(Default value = ' ') returns (str) 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 ``` ObjToStringSingleObj(obj) @@ -11675,7 +14742,7 @@ Parameter Descriptions: |Name|Meaning| |---|---| -|obj|| +|obj|(Any) The object to display returns (str) Formatted output of the object's values| ``` Ok(button_text="Ok", @@ -12436,8 +15503,10 @@ Parameter Descriptions: 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 -The look and feel table itself has these indexe into the dictionary LOOK_AND_FEEL_TABLE +The look and feel table itself has these indexes into the dictionary LOOK_AND_FEEL_TABLE. +The original list was (prior to a major rework and renaming)... these names still work... SystemDefault +SystemDefaultForRead Material1 Material2 Reddit @@ -12465,6 +15534,14 @@ Kayak SandyBeach TealMono +In Nov 2019 a new Theme Formula was devised to make choosing a theme easier: +The "Formula" is: +["Dark" or "Light"] Color Number +Colors can be Blue Brown Grey Green Purple Red Teal Yellow Black +The number will vary for each pair. There are more DarkGrey entries than there are LightYellow for example. +Default = The default settings (only button color is different than system default) +Default1 = The full system default including the button (everything's gray... how sad... don't be all gray... please....) + ``` change_look_and_feel(index, force=False) ``` @@ -12551,8 +15628,10 @@ Parameter Descriptions: |window|(Window) The window object to fill| |values_dict|(Dict[Any:Any]) A dictionary with element keys as key and value is values parm for Update call| +Get a list of the valid values to pass into your call to change_look_and_feel + ``` -list_of_look_and_feel_values() +list_of_look_and_feel_values() -> List[str] - list of valid string values ``` The PySimpleGUI "Test Harness". This is meant to be a super-quick test of the Elements. @@ -12561,6 +15640,8 @@ The PySimpleGUI "Test Harness". This is meant to be a super-quick test of the E 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=" ") ``` @@ -12569,8 +15650,11 @@ Parameter Descriptions: |Name|Meaning| |---|---| -|obj|| -|extra|(Default value = ' ')| +|obj|(Any) The object to display| +|extra|(Default value = ' ') returns (str) 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 ``` obj_to_string_single_obj(obj) @@ -12580,7 +15664,7 @@ Parameter Descriptions: |Name|Meaning| |---|---| -|obj|| +|obj|(Any) The object to display returns (str) Formatted output of the object's values| ``` one_line_progress_meter(title, @@ -14728,7 +17812,29 @@ Let's hope it doesn't all blow up in our faces! * Fix in popup_get_files when 0 length of filename * Fix in Window.SetIcon - properly sets icon using file with Linux now. Was always defaulting +## 4.6 PySimpleGUI 16-Nov-2019 + +* Themes!!! +* Added a LOT of Look and Feel themes. Total < 100 now +* Doctring comments for some missing functions +* PEP8 bindings for button_rebound_collback, set_tooltip, set_focus +* Spin Element Update - shortened code +* Allow tk.PhotoImage objeft to be passed into Image.update as the data +* DrawRectangle - added line_width parameter. Defaults to 1 +* Fix for Slider - was only setting the trough color if the background color was being set_focus +* Added a deiconify call to Window.Normal so it can be used to restore a window that has been minimized. Not working on Linux +* Combo - Fix for not allowing a "0" to be specified as the default +* Table - Saving the Frame that contains a table in the member variable table_frame. This will enable the frame to be changed to expandable in the future so that the table can be resized as a window expands. +* LOTS AND LOTS of Look and Feel themes!!!! +* Added SystemDefaultForReal to look and feel that will prodce 100% not styled windows +* Changed the "gray" strings in look and feel table into RGB strtings (e.g. gray25 = #404040). No all graphics subsystems +* Removed Mac restriction from Look and Feel setting changes. All color settings are changed EXCEPT for the button color now on a Mac +* "Fuzzy Logic" Look and Feel Theme Selection - No longer have to memorize every character and get the case right. Now can get "close enough" and it'll working +* New function - preview_all_look_and_feel_themes. Causes a window to be shown that shows all of the currently available look and feel themes +* Removed use of CloseButton in popup get file, folder, text. Was causing problems where input fields stopped working. See bug on GitHub + ### Upcoming + Make suggestions people! Future release features ## Code Condition diff --git a/readme_creator/show_all_tags.py b/readme_creator/show_all_tags.py index 478c0ba5..b78cbff6 100644 --- a/readme_creator/show_all_tags.py +++ b/readme_creator/show_all_tags.py @@ -24,12 +24,12 @@ psg_classes = list(zip([i.__name__ for i in psg_classes_], psg_classes_)) for i in sorted(psg_classes): if 'Tk' in i[0] or 'TK' in i[0] or 'Element' == i[0]: # or 'Window' == i[0]: continue - print(f'### {i[0]} Element') + print(f'## {i[0]} Element') print('') print(f'') print(f'') print('') - print('\n'.join([f"#### {j[0]}\n\n\n" for j in inspect.getmembers(i[1]) if '_' not in j[0] ])) + print('\n'.join([f"### {j[0]}\n\n\n" for j in inspect.getmembers(i[1]) if not j[0].startswith('_') ])) print('\n------------------------- Functions start here -------------------------\n')