Dynamically name tabs in a TabView

Happy New Year!

I want to dynamically name tabs in a TabView based upon variables I set elsewhere in my model. I am able to dynamically set the values in a TogglerBar using the same variables but for the tabs I am getting the variable name with $$ appended to the end. The variable names are c1Name, c2Name, etc.

ScreenShot2014-01-03at2.14.14PM.png - Tabs in TabView showing only the variable name + $$

ScreenShot2014-01-03at2.20.59PM.png - TogglerBar correctly displaying the values of the variables.

Any suggestions on how to get the tabs to be dynamically updated to reflect the variables?

Thanks!

Tim

Happy New Year Tim!

Is this similar to what you wanted? It’s a bit of a toy as I’m just passing by on a Sunday evening, note I’ve used Dynamic around all the instances of the label rather than TabView as I didn’t want the whole element to be re-drawn after each update.

DynamicModule[{lab1 = "Label One", lab2 = "Two", lab3},
 TabView[{
   Dynamic[lab1] ->
    Column[{
      InputField[Dynamic[lab1], String, 
       FieldHint -> "Label for first tab"],
      InputField[Dynamic[lab2], String, 
       FieldHint -> "Label for second tab"]}],
   Dynamic[lab2] ->
    Manipulate[
     Plot[x^lab3, {x, 0, 5}],
     {lab3, 1, 10}, LocalizeVariables -> False],
   Dynamic[lab3] -> "hey"
   }]
 ]