diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 59b06ce7..5c334924 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -605,7 +605,7 @@ class InputText(Element): # ------------------------- INPUT TEXT Element lazy functions ------------------------- # In = InputText Input = InputText - +I = InputText # ---------------------------------------------------------------------- # # Combo # @@ -1180,6 +1180,7 @@ class Text(Element): :param key: :param right_click_menu: :param tooltip: + :param tooltip: :param visible: ''' self.DisplayText = str(text) @@ -1700,6 +1701,10 @@ class Button(Element): super().__del__() +# ------------------------- Button lazy functions ------------------------- # +B = Button +Btn = Button +Butt = Button # ---------------------------------------------------------------------- # # ButtonMenu Class # @@ -1875,7 +1880,7 @@ class Image(Element): self.CurrentFrameNumber = 0 self.TotalAnimatedFrames = 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, tooltip=tooltip, visible=visible) diff --git a/PySimpleGUIQt/PySimpleGUIQt.py b/PySimpleGUIQt/PySimpleGUIQt.py index 57e09da0..4e602552 100644 --- a/PySimpleGUIQt/PySimpleGUIQt.py +++ b/PySimpleGUIQt/PySimpleGUIQt.py @@ -603,9 +603,10 @@ class InputText(Element): super().__del__() -# ------------------------- INPUT TEXT Element lazy functions ------------------------- # +# ------------------------- INPUT TEXT lazy functions ------------------------- # In = InputText Input = InputText +I = InputText # ---------------------------------------------------------------------- # @@ -1334,7 +1335,7 @@ class Button(Element): self.FileTypes = file_types self.TKButton = None self.Target = target - self.ButtonText = button_text + self.ButtonText = str(button_text) self.ButtonColor = button_color if button_color else DEFAULT_BUTTON_COLOR self.TextColor = self.ButtonColor[0] self.BackgroundColor = self.ButtonColor[1] @@ -1530,6 +1531,13 @@ class Button(Element): super().__del__() +# ------------------------- Button lazy functions ------------------------- # +B = Button +Btn = Button +Butt = Button + + + # ---------------------------------------------------------------------- # # ButtonMenu Class # # ---------------------------------------------------------------------- # diff --git a/PySimpleGUIQt/readme.md b/PySimpleGUIQt/readme.md index aa8969ed..82de88f2 100644 --- a/PySimpleGUIQt/readme.md +++ b/PySimpleGUIQt/readme.md @@ -16,7 +16,7 @@ ![Python Version](https://img.shields.io/badge/Python-3.x-yellow.svg) -![Python Version](https://img.shields.io/badge/PySimpleGUIQt_For_Python_3.x_Version-00.24.0-orange.svg?longCache=true&style=for-the-badge) +![Python Version](https://img.shields.io/badge/PySimpleGUIQt_For_Python_3.x_Version-00.2431.0-orange.svg?longCache=true&style=for-the-badge) @@ -26,7 +26,7 @@ "Qt without the ugly" - ## The Alpha Release Version 0.23.0 + ## The Alpha Release Version 0.231.0 [Announcements of Latest Developments](https://github.com/MikeTheWatchGuy/PySimpleGUI/issues/142) @@ -667,4 +667,7 @@ Dial - disable # License GNU Lesser General Public License (LGPL 3) + -# Acknowledgments \ No newline at end of file +# Acknowledgments + \ No newline at end of file diff --git a/PySimpleGUIWeb/PySimpleGUIWeb.py b/PySimpleGUIWeb/PySimpleGUIWeb.py index a688e4ed..a6f98b3f 100644 --- a/PySimpleGUIWeb/PySimpleGUIWeb.py +++ b/PySimpleGUIWeb/PySimpleGUIWeb.py @@ -578,7 +578,7 @@ class InputText(Element): # ------------------------- INPUT TEXT Element lazy functions ------------------------- # In = InputText Input = InputText - +I = InputText # ---------------------------------------------------------------------- # # Combo # @@ -1343,7 +1343,7 @@ class Button(Element): self.FileTypes = file_types self.TKButton = None self.Target = target - self.ButtonText = button_text + self.ButtonText = str(button_text) self.ButtonColor = button_color if button_color else DEFAULT_BUTTON_COLOR self.TextColor = self.ButtonColor[0] self.BackgroundColor = self.ButtonColor[1] @@ -1539,6 +1539,12 @@ class Button(Element): super().__del__() +# ------------------------- Button lazy functions ------------------------- # +B = Button +Btn = Button +Butt = Button + + def convert_tkinter_filetypes_to_wx(filetypes): wx_filetypes = '' for item in filetypes: @@ -1546,6 +1552,10 @@ def convert_tkinter_filetypes_to_wx(filetypes): wx_filetypes += filetype return wx_filetypes + + + + # ---------------------------------------------------------------------- # # ProgreessBar # # ---------------------------------------------------------------------- # diff --git a/PySimpleGUIWeb/readme.md b/PySimpleGUIWeb/readme.md index e69e111a..55ec784f 100644 --- a/PySimpleGUIWeb/readme.md +++ b/PySimpleGUIWeb/readme.md @@ -8,7 +8,7 @@ ![Python Version](https://img.shields.io/badge/Python-3.x-yellow.svg) -![Python Version](https://img.shields.io/badge/PySimpleGUIWeb_-0.19.0-orange.svg?longCache=true&style=for-the-badge) +![Python Version](https://img.shields.io/badge/PySimpleGUIWeb_-0.1.0-orange.svg?longCache=true&style=for-the-badge) @@ -287,6 +287,7 @@ New features # Acknowledgments \ No newline at end of file diff --git a/PySimpleGUIWx/PySimpleGUIWx.py b/PySimpleGUIWx/PySimpleGUIWx.py index 28d54288..0ba3733d 100644 --- a/PySimpleGUIWx/PySimpleGUIWx.py +++ b/PySimpleGUIWx/PySimpleGUIWx.py @@ -612,7 +612,7 @@ class InputText(Element): # ------------------------- INPUT TEXT Element lazy functions ------------------------- # In = InputText Input = InputText - +I = InputText # ---------------------------------------------------------------------- # # Combo # @@ -1396,7 +1396,7 @@ class Button(Element): self.FileTypes = file_types self.TKButton = None self.Target = target - self.ButtonText = button_text + self.ButtonText = str(button_text) self.ButtonColor = button_color if button_color else DEFAULT_BUTTON_COLOR self.TextColor = self.ButtonColor[0] self.BackgroundColor = self.ButtonColor[1] @@ -1620,6 +1620,12 @@ def convert_tkinter_filetypes_to_wx(filetypes): return wx_filetypes +# ------------------------- Button lazy functions ------------------------- # +B = Button +Btn = Button +Butt = Button + + # ---------------------------------------------------------------------- # # ProgreessBar # # ---------------------------------------------------------------------- # diff --git a/docs/cookbook.md b/docs/cookbook.md index f2fbf77d..1d28c70f 100644 --- a/docs/cookbook.md +++ b/docs/cookbook.md @@ -68,13 +68,12 @@ 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. -Note the `do_not_clear` parameter that is described in the next design pattern. ```python import PySimpleGUI as sg layout = [[sg.Text('Persistent window')], - [sg.Input(do_not_clear=True)], + [sg.Input()], [sg.Button('Read'), sg.Exit()]] window = sg.Window('Window that stays open').Layout(layout) @@ -98,7 +97,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. -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). +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. ```python import sys @@ -108,7 +107,7 @@ else: import PySimpleGUI27 as sg layout = [[sg.Text('Your typed chars appear here:'), sg.Text('', key='_OUTPUT_') ], - [sg.Input(do_not_clear=True, key='_IN_')], + [sg.Input(key='_IN_')], [sg.Button('Show'), sg.Button('Exit')]] window = sg.Window('Window Title').Layout(layout) @@ -581,7 +580,7 @@ CHROME = r"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" layout = [ [sg.Text('Text area', key='_TEXT_')], - [sg.Input(do_not_clear=True, key='_URL_')], + [sg.Input(key='_URL_')], [sg.Button('Chrome'), sg.Button('Exit')]] window = sg.Window('Window Title').Layout(layout) @@ -810,7 +809,7 @@ import PySimpleGUI as sg # Design pattern 1 - First window does not remain active layout = [[ sg.Text('Window 1'),], - [sg.Input(do_not_clear=True)], + [sg.Input()], [sg.Text('', key='_OUTPUT_')], [sg.Button('Launch 2')]] @@ -941,10 +940,10 @@ There are a number of features used in this Recipe including: # Button # Dictionary return values # Update of elements in window (Text, Input) - # do_not_clear of Input elements + layout = [[sg.Text('Enter Your Passcode')], - [sg.Input(size=(10, 1), do_not_clear=True, justification='right', key='input')], + [sg.Input(size=(10, 1), justification='right', key='input')], [sg.Button('1'), sg.Button('2'), sg.Button('3')], [sg.Button('4'), sg.Button('5'), sg.Button('6')], [sg.Button('7'), sg.Button('8'), sg.Button('9')], @@ -1551,8 +1550,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. \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 1b7322e5..c9505f2d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -33,15 +33,15 @@ -![Python Version](https://img.shields.io/badge/PySimpleGUI_For_Python_3.x_Version-3.25.0-red.svg?longCache=true&style=for-the-badge) +![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_2.7_Version-1.25.0-blue.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/PySimpleGUIQt_Version-0.22.0-orange.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/PySimpleGUIWx_version-0.3.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/PySimpleGUIWeb_Version-0.10.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) [Announcements of Latest Developments](https://github.com/MikeTheWatchGuy/PySimpleGUI/issues/142) @@ -4903,6 +4903,21 @@ Emergency patch release... going out same day as previous release * OneLineProgressMeter - Can now change the text on every call if desired +## 3.27.0 PySimpleGUI 31-Mar-2019 + +Mixup.... 3.26 changes don't appear to have been correctly released so releasing in 3.27 now + +* do_not_clear now defaults to TRUE!!! + * Input Element + * Multiline Element +* Enable Radio Buttons to be in different containers +* Ability to modify Autoscroll setting in Multiline.Update call +* PopupGetFolder, PopupGetFile, PopupGetText - title defaults to message if none provided +* PopupAnimated - image_source can be a filename or bytes (base64) +* Option Menu can now have values updated + + + ### Upcoming Make suggestions people! Future release features @@ -4966,9 +4981,10 @@ GNU Lesser General Public License (LGPL 3) + #### SORRY!! Will add these back. Lost due to file length limitation +eyJoaXN0b3J5IjpbODY0OTc4NzY1LC0xMDY1OTc4MTI2LDUxOT +A1NTk0LDIwNTMxMjUxNDksLTE1Nzg3NDY1ODgsMjYwNTg0ODE0 +LDExMDIwODgzMzMsMTY3OTg1MDk5MiwtMTQ2MTQyODEsLTYwNj +M3MTE4LC01MDkzNTkxMjMsLTI0ODk3NjI5LDEzMDc2OTI1OSwt +Mjk2NzgzNTUsLTc3NDA3NDIzMCwyNjYzNjQ0MTcsNDQ5NDMzMj +QzLC0xMTQ4NDkwNjIzXX0= +--> \ No newline at end of file