Merge pull request #1557 from PySimpleGUI/Dev-latest

Updated Button.ButtonColor when Updating so can retrieve at runtime.
This commit is contained in:
MikeTheWatchGuy 2019-06-14 15:14:52 -04:00 committed by GitHub
commit 930f6bd60a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -1703,6 +1703,7 @@ class Button(Element):
print('Button.Update *** WARNING - Button colors are not supported on the Mac***') print('Button.Update *** WARNING - Button colors are not supported on the Mac***')
if button_color != (None, None): if button_color != (None, None):
self.TKButton.config(foreground=button_color[0], background=button_color[1]) self.TKButton.config(foreground=button_color[0], background=button_color[1])
self.ButtonColor = button_color
except: except:
return return
if disabled == True: if disabled == True:
@ -4121,6 +4122,7 @@ class Window:
self.TKroot.y = event.y self.TKroot.y = event.y
except: except:
pass pass
# print('Start move {},{}'.format(event.x,event.y))
def StopMove(self, event): def StopMove(self, event):
try: try:
@ -4128,6 +4130,7 @@ class Window:
self.TKroot.y = None self.TKroot.y = None
except: except:
pass pass
# print('-Stop- move {},{}'.format(event.x,event.y))
def OnMotion(self, event): def OnMotion(self, event):
try: try:
@ -4136,6 +4139,7 @@ class Window:
x = self.TKroot.winfo_x() + deltax x = self.TKroot.winfo_x() + deltax
y = self.TKroot.winfo_y() + deltay y = self.TKroot.winfo_y() + deltay
self.TKroot.geometry("+%s+%s" % (x, y)) self.TKroot.geometry("+%s+%s" % (x, y))
# print('{},{}'.format(x,y))
except: except:
pass pass