Merge pull request #384 from MikeTheWatchGuy/Dev-latest
Fix for returning tab KEY when returning results for tab group
This commit is contained in:
commit
5800e29517
|
@ -1576,6 +1576,12 @@ class TabGroup(Element):
|
||||||
element = row[col_num]
|
element = row[col_num]
|
||||||
return element
|
return element
|
||||||
|
|
||||||
|
def FindKeyFromTabName(self, tab_name):
|
||||||
|
for row in self.Rows:
|
||||||
|
for element in row:
|
||||||
|
if element.Title == tab_name:
|
||||||
|
return element.Key
|
||||||
|
return None
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
for row in self.Rows:
|
for row in self.Rows:
|
||||||
|
@ -2663,6 +2669,9 @@ def BuildResultsForSubform(form, initialize_only, top_level_form):
|
||||||
elif element.Type == ELEM_TYPE_TAB_GROUP:
|
elif element.Type == ELEM_TYPE_TAB_GROUP:
|
||||||
try:
|
try:
|
||||||
value=element.TKNotebook.tab(element.TKNotebook.index('current'))['text']
|
value=element.TKNotebook.tab(element.TKNotebook.index('current'))['text']
|
||||||
|
tab_key = element.FindKeyFromTabName(value)
|
||||||
|
if tab_key is not None:
|
||||||
|
value = tab_key
|
||||||
except:
|
except:
|
||||||
value = None
|
value = None
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue