Message Boards Message Boards

Inserting tabs in CDF?

Posted 9 years ago

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.

enter image description here

Thank you very much for your responses.

POSTED BY: Luciano Tresto
7 Replies
Posted 9 years ago

Thank you very much Kuba!!

It's exactly what I was looking for!

Thank you again!

POSTED BY: Luciano Tresto

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.

POSTED BY: Kuba Podkalicki
Posted 9 years ago

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.

enter image description here

http://www.wolfram.com/cdf/uses-examples/data-applications.html

POSTED BY: Luciano Tresto
Posted 9 years ago

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: http://www.wolfram.com/cdf/uses-examples/infographics.html

POSTED BY: Luciano Tresto

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?

enter image description here

POSTED BY: Kuba Podkalicki
Posted 9 years ago

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!

POSTED BY: Luciano Tresto

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]

enter image description here

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

Ben

POSTED BY: Benjamin Goodman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract