Made Window.metadata and SystemTray.metadata also properties
This commit is contained in:
parent
55871d89bf
commit
faa701e3de
|
@ -7462,6 +7462,7 @@ class Window:
|
||||||
:type metadata: (Any)
|
:type metadata: (Any)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
self._metadata = None # type: Any
|
||||||
self.AutoSizeText = auto_size_text if auto_size_text is not None else DEFAULT_AUTOSIZE_TEXT
|
self.AutoSizeText = auto_size_text if auto_size_text is not None else DEFAULT_AUTOSIZE_TEXT
|
||||||
self.AutoSizeButtons = auto_size_buttons if auto_size_buttons is not None else DEFAULT_AUTOSIZE_BUTTONS
|
self.AutoSizeButtons = auto_size_buttons if auto_size_buttons is not None else DEFAULT_AUTOSIZE_BUTTONS
|
||||||
self.Title = str(title)
|
self.Title = str(title)
|
||||||
|
@ -7620,6 +7621,26 @@ class Window:
|
||||||
root.destroy()
|
root.destroy()
|
||||||
return screen_width, screen_height
|
return screen_width, screen_height
|
||||||
|
|
||||||
|
@property
|
||||||
|
def metadata(self):
|
||||||
|
"""
|
||||||
|
Metadata is available for all windows. You can set to any value.
|
||||||
|
:return: the current metadata value
|
||||||
|
:rtype: (Any)
|
||||||
|
"""
|
||||||
|
return self._metadata
|
||||||
|
|
||||||
|
|
||||||
|
@metadata.setter
|
||||||
|
def metadata(self, value):
|
||||||
|
"""
|
||||||
|
Metadata is available for all windows. You can set to any value.
|
||||||
|
:param value: Anything you want it to be
|
||||||
|
:type value: (Any)
|
||||||
|
"""
|
||||||
|
self._metadata = value
|
||||||
|
|
||||||
|
|
||||||
# ------------------------- Add ONE Row to Form ------------------------- #
|
# ------------------------- Add ONE Row to Form ------------------------- #
|
||||||
def add_row(self, *args):
|
def add_row(self, *args):
|
||||||
"""
|
"""
|
||||||
|
@ -9573,6 +9594,7 @@ class SystemTray:
|
||||||
:param metadata: User metadata that can be set to ANYTHING
|
:param metadata: User metadata that can be set to ANYTHING
|
||||||
:type metadata: (Any)
|
:type metadata: (Any)
|
||||||
"""
|
"""
|
||||||
|
self._metadata = None
|
||||||
self.Menu = menu
|
self.Menu = menu
|
||||||
self.TrayIcon = None
|
self.TrayIcon = None
|
||||||
self.Shown = False
|
self.Shown = False
|
||||||
|
@ -9597,6 +9619,26 @@ class SystemTray:
|
||||||
|
|
||||||
self.window['-IMAGE-'].bind('<Double-Button-1>', '+DOUBLE_CLICK')
|
self.window['-IMAGE-'].bind('<Double-Button-1>', '+DOUBLE_CLICK')
|
||||||
|
|
||||||
|
@property
|
||||||
|
def metadata(self):
|
||||||
|
"""
|
||||||
|
Metadata is an SystemTray property that you can use at any time to hold any value
|
||||||
|
:return: the current metadata value
|
||||||
|
:rtype: (Any)
|
||||||
|
"""
|
||||||
|
return self._metadata
|
||||||
|
|
||||||
|
|
||||||
|
@metadata.setter
|
||||||
|
def metadata(self, value):
|
||||||
|
"""
|
||||||
|
Metadata is an SystemTray property that you can use at any time to hold any value
|
||||||
|
:param value: Anything you want it to be
|
||||||
|
:type value: (Any)
|
||||||
|
"""
|
||||||
|
self._metadata = value
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def read(self, timeout=None):
|
def read(self, timeout=None):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue