# Inserting tabs in CDF?

**URL:** <https://community.wolfram.com/t/inserting-tabs-in-cdf/8458>\
**Category:** Questions\
**Tags:** mathematica, computable-document-format, interface-construction, ui-ux-and-ide\
**Created:** [April 29, 2016, 8:41pm UTC](https://community.wolfram.com/t/inserting-tabs-in-cdf/8458 "2016-04-29T20:41:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![danigr93](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@danigr93](https://community.wolfram.com/u/danigr93)\
**Post date:** [April 29, 2016, 8:41pm UTC](https://community.wolfram.com/t/inserting-tabs-in-cdf/8458/1 "2016-04-29T20:41:40Z")

</div>

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.

 ![Captura.PNG](https://global.discourse-cdn.com/wolfram/original/1X/ec35116f9702ec37e3f42e43c88b17a2bc63e183.png)

Thank you very much for your responses.

---

<div class="post-metadata">

**Author:** ![bgoodman11](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/bgoodman11/32/23878_2.png) [@bgoodman11](https://community.wolfram.com/u/bgoodman11)\
**Post date:** [April 29, 2016, 9:35pm UTC](https://community.wolfram.com/t/inserting-tabs-in-cdf/8458/2 "2016-04-29T21:35:29Z")

</div>

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](https://global.discourse-cdn.com/wolfram/original/3X/b/0/b02d4a3f052f1c838c7656250bd5cc6bfabddc15.gif)

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

Ben

---

<div class="post-metadata">

**Author:** ![danigr93](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@danigr93](https://community.wolfram.com/u/danigr93)\
**Post date:** [April 29, 2016, 10:11pm UTC](https://community.wolfram.com/t/inserting-tabs-in-cdf/8458/3 "2016-04-29T22:11:31Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![kubapod](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/kubapod/32/18662_2.png) [@kubapod](https://community.wolfram.com/u/kubapod)\
**Post date:** [April 30, 2016, 12:44pm UTC](https://community.wolfram.com/t/inserting-tabs-in-cdf/8458/4 "2016-04-30T12:44:46Z")

</div>

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?

 ![ThisCDF.jpg](https://global.discourse-cdn.com/wolfram/original/2X/c/caa82f43954364238dd3f5399d84781197e41ed8.jpeg)

---

<div class="post-metadata">

**Author:** ![danigr93](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@danigr93](https://community.wolfram.com/u/danigr93)\
**Post date:** [April 30, 2016, 3:54pm UTC](https://community.wolfram.com/t/inserting-tabs-in-cdf/8458/5 "2016-04-30T15:54:49Z")

</div>

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:

> **[Data Applications: Using the Computable Document Format (CDF)](https://www.wolfram.com/cdf/uses-examples/infographics.html)**
>
> Rapidly develop computationally intensive applications with easy-to-use controls, and deploy as standalone apps or web plugins. Try interactive example.

---

<div class="post-metadata">

**Author:** ![danigr93](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@danigr93](https://community.wolfram.com/u/danigr93)\
**Post date:** [April 30, 2016, 7:43pm UTC](https://community.wolfram.com/t/inserting-tabs-in-cdf/8458/6 "2016-04-30T19:43:36Z")

</div>

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.

 ![10146Captura.PNG](https://global.discourse-cdn.com/wolfram/original/3X/4/6/46cc6861cec0542572799ce1f4ba07e643919fa7.png)

> **[Data Applications: Using the Computable Document Format (CDF)](https://www.wolfram.com/cdf/uses-examples/data-applications.html)**
>
> Rapidly develop computationally intensive applications with easy-to-use controls, and deploy as standalone apps or web plugins. Try interactive example.

---

<div class="post-metadata">

**Author:** ![kubapod](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/kubapod/32/18662_2.png) [@kubapod](https://community.wolfram.com/u/kubapod)\
**Post date:** [April 30, 2016, 9:30pm UTC](https://community.wolfram.com/t/inserting-tabs-in-cdf/8458/7 "2016-04-30T21:30:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![danigr93](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@danigr93](https://community.wolfram.com/u/danigr93)\
**Post date:** [April 30, 2016, 10:28pm UTC](https://community.wolfram.com/t/inserting-tabs-in-cdf/8458/8 "2016-04-30T22:28:10Z")

</div>

Thank you very much Kuba!!

It’s exactly what I was looking for!

Thank you again!
