Mass update for Window Layout Change

This commit is contained in:
MikeTheWatchGuy 2019-04-11 18:20:26 -04:00
parent a87a5d0529
commit 03e6310834
8 changed files with 73 additions and 50 deletions

View File

@ -1180,7 +1180,6 @@ class Text(Element):
:param key: :param key:
:param right_click_menu: :param right_click_menu:
:param tooltip: :param tooltip:
:param tooltip:
:param visible: :param visible:
''' '''
self.DisplayText = str(text) self.DisplayText = str(text)
@ -3499,7 +3498,7 @@ class Window:
animated_popup_dict = {} animated_popup_dict = {}
container_element_counter = 0 # used to get a number of Container Elements (Frame, Column, Tab) container_element_counter = 0 # used to get a number of Container Elements (Frame, Column, Tab)
def __init__(self, title, default_element_size=DEFAULT_ELEMENT_SIZE, default_button_element_size=(None, None), def __init__(self, title, layout=None, default_element_size=DEFAULT_ELEMENT_SIZE, default_button_element_size=(None, None),
auto_size_text=None, auto_size_buttons=None, location=(None, None), size=(None, None), element_padding=None, margins=(None, None), button_color=None, font=None, auto_size_text=None, auto_size_buttons=None, location=(None, None), size=(None, None), element_padding=None, margins=(None, None), button_color=None, font=None,
progress_bar_color=(None, None), background_color=None, border_depth=None, auto_close=False, progress_bar_color=(None, None), background_color=None, border_depth=None, auto_close=False,
auto_close_duration=DEFAULT_AUTOCLOSE_TIME, icon=DEFAULT_WINDOW_ICON, force_toplevel=False, auto_close_duration=DEFAULT_AUTOCLOSE_TIME, icon=DEFAULT_WINDOW_ICON, force_toplevel=False,
@ -3591,7 +3590,8 @@ class Window:
self.RightClickMenu = right_click_menu self.RightClickMenu = right_click_menu
self.Margins = margins if margins != (None, None) else DEFAULT_MARGINS self.Margins = margins if margins != (None, None) else DEFAULT_MARGINS
self.ContainerElemementNumber = Window.GetAContainerNumber() self.ContainerElemementNumber = Window.GetAContainerNumber()
if layout is not None:
self.Layout(layout)
@classmethod @classmethod
def GetAContainerNumber(cls): def GetAContainerNumber(cls):

View File

@ -53,7 +53,6 @@ g_time_end = 0
g_time_delta = 0 g_time_delta = 0
def TimerStart(): def TimerStart():
global g_time_start global g_time_start
@ -619,7 +618,7 @@ class InputText(Element):
# ------------------------- INPUT TEXT Element lazy functions ------------------------- # # ------------------------- INPUT TEXT Element lazy functions ------------------------- #
In = InputText In = InputText
Input = InputText Input = InputText
I = InputText
# ---------------------------------------------------------------------- # # ---------------------------------------------------------------------- #
# Combo # # Combo #
@ -1494,7 +1493,7 @@ class Button(Element):
self.FileTypes = file_types self.FileTypes = file_types
self.TKButton = None self.TKButton = None
self.Target = target self.Target = target
self.ButtonText = button_text self.ButtonText = str(button_text)
if sys.platform == 'darwin' and button_color is not None: if sys.platform == 'darwin' and button_color is not None:
print('Button *** WARNING - Button colors are not supported on the Mac ***') print('Button *** WARNING - Button colors are not supported on the Mac ***')
self.ButtonColor = button_color if button_color else DEFAULT_BUTTON_COLOR self.ButtonColor = button_color if button_color else DEFAULT_BUTTON_COLOR
@ -1714,6 +1713,10 @@ class Button(Element):
super().__del__() super().__del__()
# ------------------------- Button lazy functions ------------------------- #
B = Button
Btn = Button
Butt = Button
# ---------------------------------------------------------------------- # # ---------------------------------------------------------------------- #
# ButtonMenu Class # # ButtonMenu Class #
@ -1889,7 +1892,7 @@ class Image(Element):
self.CurrentFrameNumber = 0 self.CurrentFrameNumber = 0
self.TotalAnimatedFrames = 0 self.TotalAnimatedFrames = 0
self.LastFrameTime = 0 self.LastFrameTime = 0
self.Source = filename or data self.Source = filename if filename is not None else data
super().__init__(ELEM_TYPE_IMAGE, size=size, background_color=background_color, pad=pad, key=key, super().__init__(ELEM_TYPE_IMAGE, size=size, background_color=background_color, pad=pad, key=key,
tooltip=tooltip, visible=visible) tooltip=tooltip, visible=visible)
@ -3508,7 +3511,7 @@ class Window(object):
animated_popup_dict = {} animated_popup_dict = {}
container_element_counter = 0 # used to get a number of Container Elements (Frame, Column, Tab) container_element_counter = 0 # used to get a number of Container Elements (Frame, Column, Tab)
def __init__(self, title, default_element_size=DEFAULT_ELEMENT_SIZE, default_button_element_size=(None, None), def __init__(self, title, layout=None, default_element_size=DEFAULT_ELEMENT_SIZE, default_button_element_size=(None, None),
auto_size_text=None, auto_size_buttons=None, location=(None, None), size=(None, None), element_padding=None, margins=(None, None), button_color=None, font=None, auto_size_text=None, auto_size_buttons=None, location=(None, None), size=(None, None), element_padding=None, margins=(None, None), button_color=None, font=None,
progress_bar_color=(None, None), background_color=None, border_depth=None, auto_close=False, progress_bar_color=(None, None), background_color=None, border_depth=None, auto_close=False,
auto_close_duration=DEFAULT_AUTOCLOSE_TIME, icon=DEFAULT_WINDOW_ICON, force_toplevel=False, auto_close_duration=DEFAULT_AUTOCLOSE_TIME, icon=DEFAULT_WINDOW_ICON, force_toplevel=False,
@ -3600,7 +3603,8 @@ class Window(object):
self.RightClickMenu = right_click_menu self.RightClickMenu = right_click_menu
self.Margins = margins if margins != (None, None) else DEFAULT_MARGINS self.Margins = margins if margins != (None, None) else DEFAULT_MARGINS
self.ContainerElemementNumber = Window.GetAContainerNumber() self.ContainerElemementNumber = Window.GetAContainerNumber()
if layout is not None:
self.Layout(layout)
@classmethod @classmethod
def GetAContainerNumber(cls): def GetAContainerNumber(cls):
@ -4699,6 +4703,10 @@ def _FindElementWithFocusInSubForm(form):
if element.TKText is not None: if element.TKText is not None:
if element.TKText is element.TKText.focus_get(): if element.TKText is element.TKText.focus_get():
return element return element
if element.Type == ELEM_TYPE_BUTTON:
if element.TKButton is not None:
if element.TKButton is element.TKButton.focus_get():
return element
if sys.version_info[0] >= 3: if sys.version_info[0] >= 3:
def AddMenuItem(top_menu, sub_menu_info, element, is_sub_menu=False, skip=False): def AddMenuItem(top_menu, sub_menu_info, element, is_sub_menu=False, skip=False):
@ -6001,6 +6009,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
def ConvertFlexToTK(MyFlexForm): def ConvertFlexToTK(MyFlexForm):
MyFlexForm # type: Window
master = MyFlexForm.TKroot master = MyFlexForm.TKroot
master.title(MyFlexForm.Title) master.title(MyFlexForm.Title)
InitializeResults(MyFlexForm) InitializeResults(MyFlexForm)

View File

@ -3082,7 +3082,7 @@ class Window:
active_popups = {} active_popups = {}
def __init__(self, title, default_element_size=DEFAULT_ELEMENT_SIZE, default_button_element_size=(None, None), def __init__(self, title, layout=None, default_element_size=DEFAULT_ELEMENT_SIZE, default_button_element_size=(None, None),
auto_size_text=None, auto_size_buttons=None, location=(None, None), size=(None, None), element_padding=None, button_color=None, font=None, auto_size_text=None, auto_size_buttons=None, location=(None, None), size=(None, None), element_padding=None, button_color=None, font=None,
progress_bar_color=(None, None), background_color=None, border_depth=None, auto_close=False, progress_bar_color=(None, None), background_color=None, border_depth=None, auto_close=False,
auto_close_duration=DEFAULT_AUTOCLOSE_TIME, icon=DEFAULT_WINDOW_ICON, force_toplevel=False, auto_close_duration=DEFAULT_AUTOCLOSE_TIME, icon=DEFAULT_WINDOW_ICON, force_toplevel=False,
@ -3174,7 +3174,8 @@ class Window:
self.BackgroundImage = background_image self.BackgroundImage = background_image
self.XFound = False self.XFound = False
self.DisableMinimize = disable_minimize self.DisableMinimize = disable_minimize
if layout is not None:
self.Layout(layout)
@classmethod @classmethod
def IncrementOpenCount(self): def IncrementOpenCount(self):

View File

@ -2646,7 +2646,7 @@ class Window:
active_windows = [ ] # type: Window [] active_windows = [ ] # type: Window []
App = None # type: remi.App App = None # type: remi.App
def __init__(self, title, default_element_size=DEFAULT_ELEMENT_SIZE, default_button_element_size=(None, None), def __init__(self, title, layout=None, default_element_size=DEFAULT_ELEMENT_SIZE, default_button_element_size=(None, None),
auto_size_text=None, auto_size_buttons=None, location=(None, None), size=(None, None), auto_size_text=None, auto_size_buttons=None, location=(None, None), size=(None, None),
element_padding=None, button_color=None, font=None, element_padding=None, button_color=None, font=None,
progress_bar_color=(None, None), background_color=None, border_depth=None, auto_close=False, progress_bar_color=(None, None), background_color=None, border_depth=None, auto_close=False,
@ -2757,6 +2757,9 @@ class Window:
self.MessageQueue = Queue() self.MessageQueue = Queue()
self.master_widget = None # type: remi.gui.VBox self.master_widget = None # type: remi.gui.VBox
if layout is not None:
self.Layout(layout)
@classmethod @classmethod
def IncrementOpenCount(self): def IncrementOpenCount(self):
self.NumOpenWindows += 1 self.NumOpenWindows += 1

View File

@ -2948,7 +2948,7 @@ class Window:
stdout_is_rerouted = False stdout_is_rerouted = False
stdout_location = None stdout_location = None
def __init__(self, title, default_element_size=DEFAULT_ELEMENT_SIZE, default_button_element_size=(None, None), def __init__(self, title, layout=None, default_element_size=DEFAULT_ELEMENT_SIZE, default_button_element_size=(None, None),
auto_size_text=None, auto_size_buttons=None, location=(None, None), size=(None, None), element_padding=None, button_color=None, font=None, auto_size_text=None, auto_size_buttons=None, location=(None, None), size=(None, None), element_padding=None, button_color=None, font=None,
progress_bar_color=(None, None), background_color=None, border_depth=None, auto_close=False, progress_bar_color=(None, None), background_color=None, border_depth=None, auto_close=False,
auto_close_duration=None, icon=DEFAULT_BASE64_ICON, force_toplevel=False, auto_close_duration=None, icon=DEFAULT_BASE64_ICON, force_toplevel=False,
@ -3044,7 +3044,8 @@ class Window:
self.MasterFrame = None # type: wx.Frame self.MasterFrame = None # type: wx.Frame
self.MasterPanel = None # type: wx.Panel self.MasterPanel = None # type: wx.Panel
self.IgnoreClose = False self.IgnoreClose = False
if layout is not None:
self.Layout(layout)
@classmethod @classmethod
def IncrementOpenCount(self): def IncrementOpenCount(self):

View File

@ -68,12 +68,13 @@ Some of the more advanced programs operate with the window remaining visible on
This code will present a window and will print values until the user clicks the exit button or closes window using an X. This code will present a window and will print values until the user clicks the exit button or closes window using an X.
Note the `do_not_clear` parameter that is described in the next design pattern.
```python ```python
import PySimpleGUI as sg import PySimpleGUI as sg
layout = [[sg.Text('Persistent window')], layout = [[sg.Text('Persistent window')],
[sg.Input()], [sg.Input(do_not_clear=True)],
[sg.Button('Read'), sg.Exit()]] [sg.Button('Read'), sg.Exit()]]
window = sg.Window('Window that stays open').Layout(layout) window = sg.Window('Window that stays open').Layout(layout)
@ -97,7 +98,7 @@ This is a slightly more complex, but maybe more realistic version that reads inp
Do not worry yet what all of these statements mean. Just copy it so you can begin to play with it, make some changes. Experiment to see how thing work. Do not worry yet what all of these statements mean. Just copy it so you can begin to play with it, make some changes. Experiment to see how thing work.
A final note... the parameter `do_not_clear` in the input call determines the action of the input field after a button event. If this value is True, the input value remains visible following button clicks. If False, then the input field is CLEARED of whatever was input. The default is True, which means whatever is input remains visible after buttons are clicked. If your Window is more of a "form" then you will likely want to set this parameter to False. A final note... the parameter `do_not_clear` in the input call determines the action of the input field after a button event. If this value is True, the input value remains visible following button clicks. If False, then the input field is CLEARED of whatever was input. If you are building a "Form" type of window with data entry, you likely want False, the default setting (you can remove the parameter completely).
```python ```python
import sys import sys
@ -107,7 +108,7 @@ else:
import PySimpleGUI27 as sg import PySimpleGUI27 as sg
layout = [[sg.Text('Your typed chars appear here:'), sg.Text('', key='_OUTPUT_') ], layout = [[sg.Text('Your typed chars appear here:'), sg.Text('', key='_OUTPUT_') ],
[sg.Input(key='_IN_')], [sg.Input(do_not_clear=True, key='_IN_')],
[sg.Button('Show'), sg.Button('Exit')]] [sg.Button('Show'), sg.Button('Exit')]]
window = sg.Window('Window Title').Layout(layout) window = sg.Window('Window Title').Layout(layout)
@ -124,7 +125,7 @@ while True: # Event Loop
window.Close() window.Close()
``` ```
<iframe height="800px" width="100%" src="https://repl.it/@PySimpleGUI/Cookbook-Design-Pattern-2B-on-tkinter?lite=true" scrolling="no" frameborder="no" allowtransparency="true" allowfullscreen="true" sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-modals"></iframe> <iframe height="800px" width="100%" src="https://repl.it/@PySimpleGUI/Design-Pattern-2B-Persistent-Window-with-Updates?lite=false" scrolling="no" frameborder="no" allowtransparency="true" allowfullscreen="true" sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-modals"></iframe>
# Simple Data Entry - Return Values As List # Simple Data Entry - Return Values As List
@ -580,7 +581,7 @@ CHROME = r"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
layout = [ [sg.Text('Text area', key='_TEXT_')], layout = [ [sg.Text('Text area', key='_TEXT_')],
[sg.Input(key='_URL_')], [sg.Input(do_not_clear=True, key='_URL_')],
[sg.Button('Chrome'), sg.Button('Exit')]] [sg.Button('Chrome'), sg.Button('Exit')]]
window = sg.Window('Window Title').Layout(layout) window = sg.Window('Window Title').Layout(layout)
@ -809,7 +810,7 @@ import PySimpleGUI as sg
# Design pattern 1 - First window does not remain active # Design pattern 1 - First window does not remain active
layout = [[ sg.Text('Window 1'),], layout = [[ sg.Text('Window 1'),],
[sg.Input()], [sg.Input(do_not_clear=True)],
[sg.Text('', key='_OUTPUT_')], [sg.Text('', key='_OUTPUT_')],
[sg.Button('Launch 2')]] [sg.Button('Launch 2')]]
@ -925,6 +926,7 @@ There are a number of features used in this Recipe including:
* Button * Button
* Dictionary Return values * Dictionary Return values
* Update of Elements in window (Input, Text) * Update of Elements in window (Input, Text)
* do_not_clear of Input Elements
![keypad 2](https://user-images.githubusercontent.com/13696193/44640891-57504d80-a992-11e8-93f4-4e97e586505e.jpg) ![keypad 2](https://user-images.githubusercontent.com/13696193/44640891-57504d80-a992-11e8-93f4-4e97e586505e.jpg)
@ -939,10 +941,10 @@ There are a number of features used in this Recipe including:
# Button # Button
# Dictionary return values # Dictionary return values
# Update of elements in window (Text, Input) # Update of elements in window (Text, Input)
# do_not_clear of Input elements
layout = [[sg.Text('Enter Your Passcode')], layout = [[sg.Text('Enter Your Passcode')],
[sg.Input(size=(10, 1), justification='right', key='input')], [sg.Input(size=(10, 1), do_not_clear=True, justification='right', key='input')],
[sg.Button('1'), sg.Button('2'), sg.Button('3')], [sg.Button('1'), sg.Button('2'), sg.Button('3')],
[sg.Button('4'), sg.Button('5'), sg.Button('6')], [sg.Button('4'), sg.Button('5'), sg.Button('6')],
[sg.Button('7'), sg.Button('8'), sg.Button('9')], [sg.Button('7'), sg.Button('8'), sg.Button('9')],
@ -1549,9 +1551,8 @@ That's all... Run your `my_program.exe` file on the Windows machine of your choo
Your EXE file should run without creating a "shell window". Only the GUI window should show up on your taskbar. Your EXE file should run without creating a "shell window". Only the GUI window should show up on your taskbar.
<!--stackedit_data: <!--stackedit_data:
eyJoaXN0b3J5IjpbNjIxOTUxNDYzLC0xODA5NzIxMjMxLC0xMz eyJoaXN0b3J5IjpbLTEzNTc5NjUyNTUsLTk0Mjc2ODgzNywtMz
U3OTY1MjU1LC05NDI3Njg4MzcsLTM1MDcwNjgxOCwtMTk4MzIw UwNzA2ODE4LC0xOTgzMjAzNjMwLC0xMDAwMjc2OTU0LC0xNDAy
MzYzMCwtMTAwMDI3Njk1NCwtMTQwMjg0MDk4Niw2Njg3ODk3ND ODQwOTg2LDY2ODc4OTc0OSwtMTE3NDc5OTg5Miw3MTcwNDk2Nj
ksLTExNzQ3OTk4OTIsNzE3MDQ5NjYwLC02Nzk1NDk2NzUsLTMz AsLTY3OTU0OTY3NSwtMzM5MzcxMzUyXX0=
OTM3MTM1Ml19
--> -->

View File

@ -33,15 +33,15 @@
![Python Version](https://img.shields.io/badge/PySimpleGUI_For_Python_3.x_Version-3.27.0-red.svg?longCache=true&style=for-the-badge) ![Python Version](https://img.shields.io/badge/PySimpleGUI_For_Python_3.x_Version-3.28.0-red.svg?longCache=true&style=for-the-badge)
![Python Version](https://img.shields.io/badge/PySimpleGUI_For_Python_2.7_Version-1.27.0-blue.svg?longCache=true&style=for-the-badge) ![Python Version](https://img.shields.io/badge/PySimpleGUI_For_Python_2.7_Version-1.28.0-blue.svg?longCache=true&style=for-the-badge)
![Python Version](https://img.shields.io/badge/PySimpleGUIQt_Version-0.23.0-orange.svg?longCache=true&style=for-the-badge) ![Python Version](https://img.shields.io/badge/PySimpleGUIQt_Version-0.26.0-orange.svg?longCache=true&style=for-the-badge)
![Python Version](https://img.shields.io/badge/PySimpleGUIWx_version-0.9.0-orange.svg?longCache=true&style=for-the-badge) ![Python Version](https://img.shields.io/badge/PySimpleGUIWx_version-0.11.0-orange.svg?longCache=true&style=for-the-badge)
![Python Version](https://img.shields.io/badge/PySimpleGUIWeb_Version-0.18.0-orange.svg?longCache=true&style=for-the-badge) ![Python Version](https://img.shields.io/badge/PySimpleGUIWeb_Version-0.22.0-orange.svg?longCache=true&style=for-the-badge)
[Announcements of Latest Developments](https://github.com/MikeTheWatchGuy/PySimpleGUI/issues/142) [Announcements of Latest Developments](https://github.com/MikeTheWatchGuy/PySimpleGUI/issues/142)
@ -4916,6 +4916,14 @@ Mixup.... 3.26 changes don't appear to have been correctly released so releasing
* PopupAnimated - image_source can be a filename or bytes (base64) * PopupAnimated - image_source can be a filename or bytes (base64)
* Option Menu can now have values updated * Option Menu can now have values updated
## 3.28.0 11-Apr-2019 PySimpleGUI
* NEW Window Parameter - layout - second parameter. Can pass in layout directly now!
* New shortcuts
* I = InputText
* B = Btn = Butt = Button
* Convert button text to string when creating buttons
* Buttons are returned now as well as input fields when searching for element with focus
### Upcoming ### Upcoming
@ -4961,17 +4969,13 @@ This is a language feature that is featured **heavily** in all of the API calls
**tkinter** **tkinter**
tkinter is the "official" GUI that Python supports. It runs on Windows, Linux, and Mac. It was chosen as the first target GUI framework due to its ***ubiquity***. Nearly all Python installations, with the exception of Ubuntu Linux, come pre-loaded with tkinter. It is the "simplest" of the GUI frameworks to get up an running (among Qt, WxPython, Kivy, etc). tkinter is the "official" GUI that Python supports. It runs on Windows, Linux, and Mac. It was chosen as the first target GUI framework due to its ***ubiquity***. Nearly all Python installations, with the exception of Ubuntu Linux, come pre-loaded with tkinter. It is the "simplest" of the GUI frameworks to get up an running (among Qt, WxPython, Kivy, etc).
From the start of the PSG project, tkinter was not meant to be the only underlying GUI framework for PySimpleGUI. It is merely a starting point. All journeys begin with one step forward and choosing tkinter was the first of many steps for PySimpleGUI. From the start of the PSG project, tkinter was not meant to be the only underlying GUI framework for PySimpleGUI. It is merely a starting point. All journeys begin with one step forward and choosing tkinter was the first of many steps for PySimpleGUI. Now there are 4 ports up and running - tkinter, WxPython, Qt and Remi (web support)
## Author ## Author
MikeB MikeB
## Demo Code Contributors
[JorjMcKie](https://github.com/JorjMcKie) - PDF and image viewers (plus a number of code suggestions)
[Otherion](https://github.com/Otherion) - Table Demos Panda & CSV. Loads of suggestions to the core APIs
## License ## License

View File

@ -33,15 +33,15 @@
![Python Version](https://img.shields.io/badge/PySimpleGUI_For_Python_3.x_Version-3.27.0-red.svg?longCache=true&style=for-the-badge) ![Python Version](https://img.shields.io/badge/PySimpleGUI_For_Python_3.x_Version-3.28.0-red.svg?longCache=true&style=for-the-badge)
![Python Version](https://img.shields.io/badge/PySimpleGUI_For_Python_2.7_Version-1.27.0-blue.svg?longCache=true&style=for-the-badge) ![Python Version](https://img.shields.io/badge/PySimpleGUI_For_Python_2.7_Version-1.28.0-blue.svg?longCache=true&style=for-the-badge)
![Python Version](https://img.shields.io/badge/PySimpleGUIQt_Version-0.23.0-orange.svg?longCache=true&style=for-the-badge) ![Python Version](https://img.shields.io/badge/PySimpleGUIQt_Version-0.26.0-orange.svg?longCache=true&style=for-the-badge)
![Python Version](https://img.shields.io/badge/PySimpleGUIWx_version-0.9.0-orange.svg?longCache=true&style=for-the-badge) ![Python Version](https://img.shields.io/badge/PySimpleGUIWx_version-0.11.0-orange.svg?longCache=true&style=for-the-badge)
![Python Version](https://img.shields.io/badge/PySimpleGUIWeb_Version-0.18.0-orange.svg?longCache=true&style=for-the-badge) ![Python Version](https://img.shields.io/badge/PySimpleGUIWeb_Version-0.22.0-orange.svg?longCache=true&style=for-the-badge)
[Announcements of Latest Developments](https://github.com/MikeTheWatchGuy/PySimpleGUI/issues/142) [Announcements of Latest Developments](https://github.com/MikeTheWatchGuy/PySimpleGUI/issues/142)
@ -4916,6 +4916,14 @@ Mixup.... 3.26 changes don't appear to have been correctly released so releasing
* PopupAnimated - image_source can be a filename or bytes (base64) * PopupAnimated - image_source can be a filename or bytes (base64)
* Option Menu can now have values updated * Option Menu can now have values updated
## 3.28.0 11-Apr-2019 PySimpleGUI
* NEW Window Parameter - layout - second parameter. Can pass in layout directly now!
* New shortcuts
* I = InputText
* B = Btn = Butt = Button
* Convert button text to string when creating buttons
* Buttons are returned now as well as input fields when searching for element with focus
### Upcoming ### Upcoming
@ -4961,17 +4969,13 @@ This is a language feature that is featured **heavily** in all of the API calls
**tkinter** **tkinter**
tkinter is the "official" GUI that Python supports. It runs on Windows, Linux, and Mac. It was chosen as the first target GUI framework due to its ***ubiquity***. Nearly all Python installations, with the exception of Ubuntu Linux, come pre-loaded with tkinter. It is the "simplest" of the GUI frameworks to get up an running (among Qt, WxPython, Kivy, etc). tkinter is the "official" GUI that Python supports. It runs on Windows, Linux, and Mac. It was chosen as the first target GUI framework due to its ***ubiquity***. Nearly all Python installations, with the exception of Ubuntu Linux, come pre-loaded with tkinter. It is the "simplest" of the GUI frameworks to get up an running (among Qt, WxPython, Kivy, etc).
From the start of the PSG project, tkinter was not meant to be the only underlying GUI framework for PySimpleGUI. It is merely a starting point. All journeys begin with one step forward and choosing tkinter was the first of many steps for PySimpleGUI. From the start of the PSG project, tkinter was not meant to be the only underlying GUI framework for PySimpleGUI. It is merely a starting point. All journeys begin with one step forward and choosing tkinter was the first of many steps for PySimpleGUI. Now there are 4 ports up and running - tkinter, WxPython, Qt and Remi (web support)
## Author ## Author
MikeB MikeB
## Demo Code Contributors
[JorjMcKie](https://github.com/JorjMcKie) - PDF and image viewers (plus a number of code suggestions)
[Otherion](https://github.com/Otherion) - Table Demos Panda & CSV. Loads of suggestions to the core APIs
## License ## License