Merge pull request #1394 from PySimpleGUI/Dev-latest
Addition of Button.Click() method
This commit is contained in:
commit
70efa14d5c
|
@ -1698,6 +1698,17 @@ class Button(Element):
|
|||
pass
|
||||
|
||||
|
||||
def Click(self):
|
||||
"""
|
||||
Generates a click of the button as if the user clicked the button
|
||||
:return:
|
||||
"""
|
||||
try:
|
||||
self.TKButton.invoke()
|
||||
except:
|
||||
print('Exception clicking button')
|
||||
|
||||
|
||||
def __del__(self):
|
||||
try:
|
||||
self.TKButton.__del__()
|
||||
|
|
Loading…
Reference in New Issue