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
|
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):
|
def __del__(self):
|
||||||
try:
|
try:
|
||||||
self.TKButton.__del__()
|
self.TKButton.__del__()
|
||||||
|
|
Loading…
Reference in New Issue