Merge pull request #3647 from PySimpleGUI/Dev-latest

Added key_dict property.
This commit is contained in:
PySimpleGUI 2020-11-21 16:55:40 -05:00 committed by GitHub
commit 5e671dc792
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -8983,6 +8983,20 @@ class Window:
self.multi_window_return_values_queue.put(item=(window, event, value)) self.multi_window_return_values_queue.put(item=(window, event, value))
@property
def key_dict(self):
"""
Returns a dictionary with all keys and their corresponding elements
{ key : Element }
:return: Dictionary of keys and elements
:rtype: Dict[Any:Element]
"""
return self.AllKeysDict
# def __enter__(self): # def __enter__(self):
# """ # """
# WAS used with context managers which are no longer needed nor advised. It is here for legacy support and # WAS used with context managers which are no longer needed nor advised. It is here for legacy support and