Inserting tabs in CDF?

Hi everyone.

I wish to know how to insert tabs, using DockedCells function, in a cdf document. I show a screenshoot, from Wolfram Official Page, remarking in a Red box what I’d like to do.

Thank you very much for your responses.

Hi,

I’ve been looking at those examples too lately. Is using DockedCells a requirement? Within a Manipulate environment (which you should assume to use when intending to deploy via CDF) TabView might be a better (and easier) alternative.

Perhaps this might be of use for inspiration or adaptation:

Manipulate[
 TabView[{
   "Trig. Functions" -> 
    Column[{
      TabView[{
        "Sin" -> Dynamic@Plot[Sin[x + \[Phi]], {x, 0, 2 \[Pi]}],
        "Cos" -> Dynamic@Plot[Cos[x + \[Phi]], {x, 0, 2 \[Pi]}]
        }],
      Row[{TextCell["Phase \[Phi]: "], 
        Slider[Dynamic[\[Phi]], {0, 2 \[Pi]}], Dynamic[\[Phi]]}]
      }],
   "Shapes" ->
    Column[{
      TabView[{
        "Disk" -> Dynamic@Graphics[{col, Disk[]}],
        "Square" -> Dynamic@Graphics[{col, Rectangle[]}]
        }],
      RadioButtonBar[Dynamic[col], {Red, Green, Yellow}]
      }]
   }], "",
 Initialization :> (col = Red; \[Phi] = \[Pi];), 
 SaveDefinitions -> True]

Animation.gif

I’ve been experimenting with CDFs lately so I’m quite interested to see any other responses.

Ben

Thank you very much for your response Benjamin.

DockedCells is an indispensable requirement because I need it to make a presentation. However, your response is appreciated, thanks again!

When I got this cdf, the only content it had was the inner panel made with TabView, is there anywhere a full example cdf with functionality you want to recreate?

Hi Kuba.

I’d like to know how to insert TabView, using DockedCells. The cdf I show in the post, is from Wolfram Official Page:

Sorry Kuba, I didn´t understand you. I downloaded the document and launched it in my pc, and you’re right, it contains the inner panel made with TabView only. I looked for, and found, a full example cdf, with the functionality I want to recreate. I show a screenshoot, remarking in a Red box what I’d like to do, and the URL to download the document.

Here is a minimal example:

CreateDocument @ Notebook[
  {Cell @ BoxData @ ToBoxes @ Dynamic[
       CurrentValue[   EvaluationNotebook[], {TaggingRules, "CurrentPane"}]
   ] }
  ,
  TaggingRules -> {"CurrentPane" -> 1},
  DockedCells -> {
       Cell @ BoxData @ ToBoxes @ SetterBar[
           Dynamic @ CurrentValue[  EvaluationNotebook[], {TaggingRules, "CurrentPane"}],
           Thread[{1, 2, 3} -> {"First", "Second", "Third"}]
      ]}
 ]

You can incorporate PaneSelector to show whatever you want in the main Cell.

Thank you very much Kuba!!

It’s exactly what I was looking for!

Thank you again!