Button Targets can be keys along with (row,col).

This commit is contained in:
MikeTheWatchGuy 2018-09-19 13:02:29 -04:00
parent 117216a752
commit 47807741a0
1 changed files with 6 additions and 3 deletions

View File

@ -959,9 +959,12 @@ class Button(Element):
if target == (None, None):
strvar = self.TKStringVar
else:
if len(target) == 2:
if target[0] < 0:
target = [self.Position[0] + target[0], target[1]]
target_element = self.ParentForm._GetElementAtLocation(target)
else:
target_element = self.ParentForm.FindElement(target)
try:
strvar = target_element.TKStringVar
except: pass