Button Targets can be keys along with (row,col).
This commit is contained in:
parent
117216a752
commit
47807741a0
|
@ -959,9 +959,12 @@ class Button(Element):
|
||||||
if target == (None, None):
|
if target == (None, None):
|
||||||
strvar = self.TKStringVar
|
strvar = self.TKStringVar
|
||||||
else:
|
else:
|
||||||
|
if len(target) == 2:
|
||||||
if target[0] < 0:
|
if target[0] < 0:
|
||||||
target = [self.Position[0] + target[0], target[1]]
|
target = [self.Position[0] + target[0], target[1]]
|
||||||
target_element = self.ParentForm._GetElementAtLocation(target)
|
target_element = self.ParentForm._GetElementAtLocation(target)
|
||||||
|
else:
|
||||||
|
target_element = self.ParentForm.FindElement(target)
|
||||||
try:
|
try:
|
||||||
strvar = target_element.TKStringVar
|
strvar = target_element.TKStringVar
|
||||||
except: pass
|
except: pass
|
||||||
|
|
Loading…
Reference in New Issue