Merge pull request #4172 from PySimpleGUI/Dev-latest

Release 4.39.0
This commit is contained in:
PySimpleGUI 2021-04-11 18:51:50 -04:00 committed by GitHub
commit 53f66bc341
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 1494 additions and 189 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/python3
version = __version__ = "4.38.0.13 Unreleased\nAdded Element.block_focus to allow blocking an element from getting focus, Listbox now sets the selected colors to be opposite of normal text/background colors, added highlight parms to Listbox so that they can be directly set, gave Mac users the abliity to override the TTK-Buttons-Only rule for Macs so that if forced, a Button CAN use tk buttons on a Mac, exposed listbox_frame for Listbox so can expand a listbox, new parameter right_click_menu_tearoff parm added to Window, better line wrapping for error windows, show an error window if a bad Image specified in the Image element, expand_x & expand_y parms for vtop vbottom vcenter, added code to element.expand to handle the Listbox correctly, MENU_RIGHT_CLICK_EDITME_EXIT menu defintiion, added framework_version, fix for RealtimeButton, put back __version__, popup_menu added, s parm added to all elements, new figlets, experimental - more permissive layouts - embedded layouts for PSG+ features, symbols - double L/R & arrowheads, parameter right_click_entry_selected_colors added to Window - a simple dual color string or a tuple - used for right click menus and pop_menu, FIX for write_event_value (THANK YOU daemon2021!), right click menu added to button and buttonmenu elements, constant MENU_RIGHT_CLICK_DISABLED [[]]to block element from using the window's right click menu, GitHub issue GUI added, moved theme tests into a tab"
version = __version__ = "4.39.0 Released 11-Apr-2021"
__version__ = version.split()[0] # For PEP 396 and PEP 345
@ -937,7 +937,6 @@ class Element():
"""
# If this is a minimize button for a custom titlebar, then minimize the window
if self.Key == TITLEBAR_MINIMIZE_KEY:
# if running_linux():
if running_linux():
print('* linix minimize *')
self.ParentForm.TKroot.wm_attributes("-type", "normal")
@ -967,7 +966,6 @@ class Element():
def _titlebar_restore(self, event):
# if running_linux():
if running_linux():
print('linux restore')
# if self._skip_first_restore_callback:
@ -17272,8 +17270,6 @@ def popup_menu(window, element, menu_def, title=None, location=(None, None)):
:type title: str
:param location: The location on the screen to place the window
:type location: (int, int) | (None, None)
:return:
:rtype
"""
element._popup_menu_location = location
top_menu = tk.Menu(window.TKroot, tearoff=True, tearoffcommand=element._tearoff_menu_callback)

File diff suppressed because it is too large Load Diff

View File

@ -5601,7 +5601,7 @@ Here is ***some*** of the code patterns you'll find when looking through the dem
```python
import PySimpleGUI as sg
# Design pattern 1 - First window remains active
# Design pattern 2 - First window remains active
layout = [[ sg.Text('Window 1'),],
[sg.Input(do_not_clear=True)],
@ -5617,7 +5617,7 @@ while True:
if ev1 == sg.WIN_CLOSED or ev1 == 'Exit':
break
if not win2_active and ev1 == 'Launch 2':
if not win2_active and ev1 == 'Launch 2':
win2_active = True
layout2 = [[sg.Text('Window 2')],
[sg.Button('Exit')]]
@ -5636,7 +5636,7 @@ while True:
```python
import PySimpleGUIQt as sg
# Design pattern 2 - First window does not remain active
# Design pattern 1 - First window does not remain active
layout = [[ sg.Text('Window 1'),],
[sg.Input(do_not_clear=True)],
@ -8561,7 +8561,42 @@ The "so much for no new releases for a while" release
* Also fixed a couple of places where they were being erroneously stripped from the normal menu text
* Better error reporting for duplicatea keys
* Found a problem with using print for errors - rerouted stdout/stderr can cause MORE errors
* Interestingly, popups work great for these errors as they do not havea cascading error effect
* Interestingly, popups work great for these errors as they do not have a cascading error effect
## 4.39.0 PySimpleGUI 11-Apr-2021
Window.write_event_value is solid release!
The s parm debut (alias for size... works like k does for key)
GitHub Issues GUI
* write_event_value fixed(THANK YOU daemon2021!)
* GitHub issue GUI added - access via sg.main() or sg.main_open_github_issue()
* s parm added to all elements
* Element.block_focus - blocks an element from getting focus when using keyboard
* Listbox
* Set the selected colors to be opposite of normal text/background colors
* Added highlight parms to Listbox so that they can be directly set
* The expand method now works for Listbox element
* Button on Mac can be tk Buttons
* In the past the Mac could only use ttk buttons
* Now setting use_ttk=False will cause the tk buttons to be used
* Right Click Menu
* Window get new parameter right_click_menu_tearoff to enable tearoff feature for right click menus
* Buttons and ButtonMenus can now use right click menus. Will automatically use the Window's right click menu
* New constants
* MENU_RIGHT_CLICK_EDITME_EXIT = ['_', ['Edit Me', 'Exit']] - a common menu for simple programs
* MENU_RIGHT_CLICK_DISABLED = [[]] to block an element from getting a window's right click menu
* parameter right_click_entry_selected_colors added to Window - a simple dual color string or a tuple - used for right click menus and pop_menu
* Error windows - better line wrapping
* Show an error window if a bad Image specified in the Image element
* expand_x & expand_y parms for vtop vbottom vcenter,
* Added framework_version
* RealtimeButton works again!
* New popup - popup_menu will show a torn off right click menu at the indicated location
* new comment figlets
* More permissive layouts - embedded layouts for PSG+ features
* Added more symbols for buttons - double L/R & arrowheads,
* Moved theme tests into a tab" in sg.main
## Upcoming
@ -8640,5 +8675,4 @@ To be clear, this is not a solicitation for your money. No one is being directl
All documentation in this file and in the PySimpleGUI GitHub account are copyright 2021 by PySimpleGUI Inc. The PySimpleGUI code, the demo programs and other source code in the PySimpleGUI account also have a copyright owned by PySimpleGUI Inc.
The name "PySimpleGUI" and the PySimpleGUI logo are Trademarked
The name "PySimpleGUI" and the PySimpleGUI logo are Trademarked

View File

@ -1811,7 +1811,43 @@ The "so much for no new releases for a while" release
* Also fixed a couple of places where they were being erroneously stripped from the normal menu text
* Better error reporting for duplicatea keys
* Found a problem with using print for errors - rerouted stdout/stderr can cause MORE errors
* Interestingly, popups work great for these errors as they do not havea cascading error effect
* Interestingly, popups work great for these errors as they do not have a cascading error effect
## 4.39.0 PySimpleGUI 11-Apr-2021
Window.write_event_value is solid release!
The s parm debut (alias for size... works like k does for key)
GitHub Issues GUI
* write_event_value fixed(THANK YOU daemon2021!)
* GitHub issue GUI added - access via sg.main() or sg.main_open_github_issue()
* s parm added to all elements
* Element.block_focus - blocks an element from getting focus when using keyboard
* Listbox
* Set the selected colors to be opposite of normal text/background colors
* Added highlight parms to Listbox so that they can be directly set
* The expand method now works for Listbox element
* Button on Mac can be tk Buttons
* In the past the Mac could only use ttk buttons
* Now setting use_ttk=False will cause the tk buttons to be used
* Right Click Menu
* Window get new parameter right_click_menu_tearoff to enable tearoff feature for right click menus
* Buttons and ButtonMenus can now use right click menus. Will automatically use the Window's right click menu
* New constants
* MENU_RIGHT_CLICK_EDITME_EXIT = ['_', ['Edit Me', 'Exit']] - a common menu for simple programs
* MENU_RIGHT_CLICK_DISABLED = [[]] to block an element from getting a window's right click menu
* parameter right_click_entry_selected_colors added to Window - a simple dual color string or a tuple - used for right click menus and pop_menu
* Error windows - better line wrapping
* Show an error window if a bad Image specified in the Image element
* expand_x & expand_y parms for vtop vbottom vcenter,
* Added framework_version
* RealtimeButton works again!
* New popup - popup_menu will show a torn off right click menu at the indicated location
* new comment figlets
* More permissive layouts - embedded layouts for PSG+ features
* Added more symbols for buttons - double L/R & arrowheads,
* Moved theme tests into a tab" in sg.main
## Upcoming

View File

@ -26,6 +26,9 @@ Here are all of the Elements, the Window & SystemTray classes, and all functions
### bind
<!-- <+Button.bind+> -->
### block_focus
<!-- <+Button.block_focus+> -->
### click
<!-- <+Button.click+> -->
@ -102,6 +105,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+ButtonMenu.bind+> -->
### block_focus
<!-- <+ButtonMenu.block_focus+> -->
### expand
<!-- <+ButtonMenu.expand+> -->
@ -170,6 +176,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Canvas.bind+> -->
### block_focus
<!-- <+Canvas.block_focus+> -->
### expand
<!-- <+Canvas.expand+> -->
@ -231,6 +240,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Checkbox.bind+> -->
### block_focus
<!-- <+Checkbox.block_focus+> -->
### expand
<!-- <+Checkbox.expand+> -->
@ -302,6 +314,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Column.bind+> -->
### block_focus
<!-- <+Column.block_focus+> -->
### expand
<!-- <+Column.expand+> -->
@ -378,6 +393,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Combo.bind+> -->
### block_focus
<!-- <+Combo.block_focus+> -->
### expand
<!-- <+Combo.expand+> -->
@ -450,6 +468,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Frame.bind+> -->
### block_focus
<!-- <+Frame.block_focus+> -->
### expand
<!-- <+Frame.expand+> -->
@ -518,14 +539,15 @@ The following methods are here for backwards compatibility reference. You will
<!-- <+Graph.doc+> -->
<!-- <+Graph.__init__+> -->
### Update
<!-- <+Graph.Update+> -->
### bind
<!-- <+Graph.bind+> -->
### block_focus
<!-- <+Graph.block_focus+> -->
### bring_figure_to_front
<!-- <+Graph.bring_figure_to_front+> -->
@ -703,6 +725,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+HorizontalSeparator.bind+> -->
### block_focus
<!-- <+HorizontalSeparator.block_focus+> -->
### expand
<!-- <+HorizontalSeparator.expand+> -->
@ -760,6 +785,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Image.bind+> -->
### block_focus
<!-- <+Image.block_focus+> -->
### expand
<!-- <+Image.expand+> -->
@ -832,6 +860,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Input.bind+> -->
### block_focus
<!-- <+Input.block_focus+> -->
### expand
<!-- <+Input.expand+> -->
@ -904,6 +935,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Listbox.bind+> -->
### block_focus
<!-- <+Listbox.block_focus+> -->
### expand
<!-- <+Listbox.expand+> -->
@ -990,6 +1024,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Menu.bind+> -->
### block_focus
<!-- <+Menu.block_focus+> -->
### expand
<!-- <+Menu.expand+> -->
@ -1053,6 +1090,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Multiline.bind+> -->
### block_focus
<!-- <+Multiline.block_focus+> -->
### expand
<!-- <+Multiline.expand+> -->
@ -1141,6 +1181,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+OptionMenu.bind+> -->
### block_focus
<!-- <+OptionMenu.block_focus+> -->
### expand
<!-- <+OptionMenu.expand+> -->
@ -1208,6 +1251,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Output.bind+> -->
### block_focus
<!-- <+Output.block_focus+> -->
### expand
<!-- <+Output.expand+> -->
@ -1283,6 +1329,10 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Pane.bind+> -->
### block_focus
<!-- <+Pane.block_focus+> -->
### expand
<!-- <+Pane.expand+> -->
@ -1418,6 +1468,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Radio.bind+> -->
### block_focus
<!-- <+Radio.block_focus+> -->
### expand
<!-- <+Radio.expand+> -->
@ -1494,6 +1547,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Slider.bind+> -->
### block_focus
<!-- <+Slider.block_focus+> -->
### expand
<!-- <+Slider.expand+> -->
@ -1557,6 +1613,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Spin.bind+> -->
### block_focus
<!-- <+Spin.block_focus+> -->
### expand
<!-- <+Spin.expand+> -->
@ -1625,6 +1684,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+StatusBar.bind+> -->
### block_focus
<!-- <+StatusBar.block_focus+> -->
### expand
<!-- <+StatusBar.expand+> -->
@ -1691,6 +1753,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Tab.bind+> -->
### block_focus
<!-- <+Tab.block_focus+> -->
### expand
<!-- <+Tab.expand+> -->
@ -1770,6 +1835,9 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+TabGroup.bind+> -->
### block_focus
<!-- <+TabGroup.block_focus+> -->
### expand
<!-- <+TabGroup.expand+> -->
@ -1843,6 +1911,8 @@ The following methods are here for backwards compatibility reference. You will
### bind
<!-- <+Table.bind+> -->
### block_focus
<!-- <+Table.block_focus+> -->
### expand
<!-- <+Table.expand+> -->
@ -1993,6 +2063,9 @@ See the Column element to get a list of method calls available. The function re
### bind
<!-- <+Tree.bind+> -->
### block_focus
<!-- <+Tree.block_focus+> -->
### expand
<!-- <+Tree.expand+> -->
@ -2604,6 +2677,7 @@ They are shown here in case you run into them in some old code.
<!-- <+func.popup_get_file+> -->
<!-- <+func.popup_get_folder+> -->
<!-- <+func.popup_get_text+> -->
<!-- <+func.popup_menu+> -->
<!-- <+func.popup_no_buttons+> -->
<!-- <+func.popup_no_titlebar+> -->
<!-- <+func.popup_non_blocking+> -->

File diff suppressed because it is too large Load Diff

View File

@ -8561,7 +8561,42 @@ The "so much for no new releases for a while" release
* Also fixed a couple of places where they were being erroneously stripped from the normal menu text
* Better error reporting for duplicatea keys
* Found a problem with using print for errors - rerouted stdout/stderr can cause MORE errors
* Interestingly, popups work great for these errors as they do not havea cascading error effect
* Interestingly, popups work great for these errors as they do not have a cascading error effect
## 4.39.0 PySimpleGUI 11-Apr-2021
Window.write_event_value is solid release!
The s parm debut (alias for size... works like k does for key)
GitHub Issues GUI
* write_event_value fixed(THANK YOU daemon2021!)
* GitHub issue GUI added - access via sg.main() or sg.main_open_github_issue()
* s parm added to all elements
* Element.block_focus - blocks an element from getting focus when using keyboard
* Listbox
* Set the selected colors to be opposite of normal text/background colors
* Added highlight parms to Listbox so that they can be directly set
* The expand method now works for Listbox element
* Button on Mac can be tk Buttons
* In the past the Mac could only use ttk buttons
* Now setting use_ttk=False will cause the tk buttons to be used
* Right Click Menu
* Window get new parameter right_click_menu_tearoff to enable tearoff feature for right click menus
* Buttons and ButtonMenus can now use right click menus. Will automatically use the Window's right click menu
* New constants
* MENU_RIGHT_CLICK_EDITME_EXIT = ['_', ['Edit Me', 'Exit']] - a common menu for simple programs
* MENU_RIGHT_CLICK_DISABLED = [[]] to block an element from getting a window's right click menu
* parameter right_click_entry_selected_colors added to Window - a simple dual color string or a tuple - used for right click menus and pop_menu
* Error windows - better line wrapping
* Show an error window if a bad Image specified in the Image element
* expand_x & expand_y parms for vtop vbottom vcenter,
* Added framework_version
* RealtimeButton works again!
* New popup - popup_menu will show a torn off right click menu at the indicated location
* new comment figlets
* More permissive layouts - embedded layouts for PSG+ features
* Added more symbols for buttons - double L/R & arrowheads,
* Moved theme tests into a tab" in sg.main
## Upcoming