# Tabbing

**URL:** <https://forum.juce.com/t/tabbing/819>\
**Category:** General JUCE discussion\
**Created:** [April 30, 2006, 10:34am UTC](https://forum.juce.com/t/tabbing/819 "2006-04-30T10:34:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kunitoki](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/kunitoki/32/15_2.png) [@kunitoki](https://forum.juce.com/u/kunitoki)\
**Post date:** [April 30, 2006, 10:34am UTC](https://forum.juce.com/t/tabbing/819/1 "2006-04-30T10:34:16Z")

</div>

i’m currently working with the tabbed component, and i’m getting stuck on how to handle multiple tabs, without having to recreate a new content component for the tab every time. i see that in

`createPanelComponentForTab (const int tabIndex,
					               const String& tabName,
					               bool& componentCanBeDeleted)`

there is the out reference componentCanBeDeleted, that i sure have setted to false, but then how can i manage to create a content component if the tab is a new one , while returning a previously created one that is already there in the tabbed component ?  
actually i’m working with tab indexes, so i’m not relying on names, but i see there is the need of a function that gets the Component\* passing it a tab index, cause you can only get back the currently selected one. but if i want to get a Component tab that isn’t the current ?

also, investigating the demo, i see there is this function in the TabbedComponent inherited example (WidgetsDemo line ~635).

` void deletePanelComponent (Component* comp)
    {
        delete comp;
    }`

but actually this isn’t called anywhere nor is a virtual method of the TabbedComponent class… mmh maybe someone could clarify myself…

---

<div class="post-metadata">

**Author:** ![kunitoki](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/kunitoki/32/15_2.png) [@kunitoki](https://forum.juce.com/u/kunitoki)\
**Post date:** [April 30, 2006, 10:38am UTC](https://forum.juce.com/t/tabbing/819/2 "2006-04-30T10:38:07Z")

</div>

oh, maybe i have to keep track myself of the array of currently opened tabs ? sure no 😉 juce is smart enough to do this for me… i hope ;/

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [April 30, 2006, 10:54am UTC](https://forum.juce.com/t/tabbing/819/3 "2006-04-30T10:54:03Z")

</div>

Yes, you’ll have to keep track of the components yourself if you don’t want them to get automatically deleted. There’s not really much it could do to help if you want to manage the components yourself, because you’d have to keep your own pointers anyway, so you can delete them later on when they’re no longer needed.

Apologies for the deletePanelComponent method - that was just left in there by mistake, probably from when I was designing the tabbed component, and can be deleted…

---

<div class="post-metadata">

**Author:** ![kunitoki](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/kunitoki/32/15_2.png) [@kunitoki](https://forum.juce.com/u/kunitoki)\
**Post date:** [April 30, 2006, 11:12am UTC](https://forum.juce.com/t/tabbing/819/4 "2006-04-30T11:12:27Z")

</div>

> [@jules](#):
>
> There’s not really much it could do to help if you want to manage the components yourself, because you’d have to keep your own pointers anyway

that’s not true, cause i’m working in some kind of open documents text editors, they’re all the same class, and all behaves the same. if the pointers was already stored in the tabbed (but they aren’t), why i should need’em saved elsewhere if i can get’em easily by index (or name or currently selected) ?

i think i will extend TabbedComponent to be lot more easy to work with…

anyway, thanx for the clarify

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [May 12, 2017, 10:02am UTC](https://forum.juce.com/t/tabbing/819/5 "2017-05-12T10:02:19Z")

</div>

Closed on May 12, 2017, 10:02am UTC


