Greetings
Under certain conditions, like the presence of data for a tabbed page, I want to highlight the page tab by changing color.
The following code works, but changes the color of ALL the tabs, I want to change only one, the tab for the page that contains or does not contain data.
' Set the TAB for Terms, Conditions and Limits to RED if there are any, otherwise it is BLACK
f = table.open("tcls")
P_Index = f.index_primary_put("ident")
Rec_No = f.fetch_Find(topparent.ident.value)
if Rec_No " 0 then
topparent:Tabbed1.Tabs.font.color = "Red"
else
topparent:Tabbed1.Tabs.font.color = "Black"
end if
f.close()
I have also tried a million variations (at least) on the following theme which do not find the property of a single tab text color ......
' This does not work, syntax error, property not found
topparent:Tabbed1.Tabs.Sheet[6].text.font.color = "Red"
The following works, but the tabbed control does not refresh its appearance back correctly when I return the text to only "TCLs" ... the tabs get all askew
topparent:Tabbed1.Tabs.Sheet[6].Text = "HAS TCLs"
else
topparent:Tabbed1.Tabs.Sheet[6].Text = "TCLs"
OK .... If you tell me how to change the color, my next question is how do I identify the tab by NAME, ie. "TCLs" instead of by number [6] ... that will fall apart if I change the number of tabs and/or the tab positioning order...
THANKS in advance
What a GREAT development environment A5 is ......
Under certain conditions, like the presence of data for a tabbed page, I want to highlight the page tab by changing color.
The following code works, but changes the color of ALL the tabs, I want to change only one, the tab for the page that contains or does not contain data.
' Set the TAB for Terms, Conditions and Limits to RED if there are any, otherwise it is BLACK
f = table.open("tcls")
P_Index = f.index_primary_put("ident")
Rec_No = f.fetch_Find(topparent.ident.value)
if Rec_No " 0 then
topparent:Tabbed1.Tabs.font.color = "Red"
else
topparent:Tabbed1.Tabs.font.color = "Black"
end if
f.close()
I have also tried a million variations (at least) on the following theme which do not find the property of a single tab text color ......
' This does not work, syntax error, property not found
topparent:Tabbed1.Tabs.Sheet[6].text.font.color = "Red"
The following works, but the tabbed control does not refresh its appearance back correctly when I return the text to only "TCLs" ... the tabs get all askew
topparent:Tabbed1.Tabs.Sheet[6].Text = "HAS TCLs"
else
topparent:Tabbed1.Tabs.Sheet[6].Text = "TCLs"
OK .... If you tell me how to change the color, my next question is how do I identify the tab by NAME, ie. "TCLs" instead of by number [6] ... that will fall apart if I change the number of tabs and/or the tab positioning order...
THANKS in advance
What a GREAT development environment A5 is ......
Comment