# \[API\] AddTabbed

**URL:** <https://tech-community.robotics.abb.com/t/api-addtabbed/1929>\
**Category:** RobotStudio\
**Created:** [June 11, 2008, 12:05pm UTC](https://tech-community.robotics.abb.com/t/api-addtabbed/1929 "2008-06-11T12:05:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grrzzz](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@Grrzzz](https://tech-community.robotics.abb.com/u/Grrzzz)\
**Post date:** [June 11, 2008, 12:05pm UTC](https://tech-community.robotics.abb.com/t/api-addtabbed/1929/1 "2008-06-11T12:05:44Z")

</div>

Hi,

I am having a problem with the AddTabbed Method found in UIEnvironment.Windows .  
How do I have to use the 2nd parameter and for what?

All I want to do is adding a new tab in the main tab selection.

This is what I came up with so far.

ToolWindow tw = new ToolWindow();  
tw.Caption = “MyTabbedToolwindow”;  
System.Windows.Forms.Button b = new System.Windows.Forms.Button();  
b.Text = “ClickMe”;  
tw.Control = b;  
UIEnvironment.Windows.AddTabbed(tw, tw2);

So what or where is tw2?! 😉

---

<div class="post-metadata">

**Author:** ![Johannes\_Weiman\_old\_account](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/johannes_weiman_old_account/32/3345_2.png) [@Johannes\_Weiman\_old\_account](https://tech-community.robotics.abb.com/u/Johannes_Weiman_old_account)\
**Post date:** [June 11, 2008, 1:51pm UTC](https://tech-community.robotics.abb.com/t/api-addtabbed/1929/2 "2008-06-11T13:51:14Z")

</div>

Hi,

The referenceWindow parameter is needed to specify the tab group to which you want to add the window. To add a tab beside the object browser, you should do like this:

UIEnvironment.Windows.AddTabbed(tw,  
UIEnvironment.Windows[“ObjectBrowser”] as ToolWindow);

regards,  
Johannes
