Merge pull request #384 from MikeTheWatchGuy/Dev-latest

Fix for returning tab KEY when returning results for tab group
This commit is contained in:
MikeTheWatchGuy 2018-09-29 23:00:27 -04:00 committed by GitHub
commit 5800e29517
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -1576,6 +1576,12 @@ class TabGroup(Element):
element = row[col_num]
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):
for row in self.Rows:
@ -2663,6 +2669,9 @@ def BuildResultsForSubform(form, initialize_only, top_level_form):
elif element.Type == ELEM_TYPE_TAB_GROUP:
try:
value=element.TKNotebook.tab(element.TKNotebook.index('current'))['text']
tab_key = element.FindKeyFromTabName(value)
if tab_key is not None:
value = tab_key
except:
value = None
else: