This is a migrated thread and some comments may be shown as answers.

Adding a windows.forms control to tabitem

1 Answer 106 Views
Tabstrip (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
iduarte
Top achievements
Rank 1
iduarte asked on 05 Sep 2008, 09:33 PM
 
Can I, add a control by code to a tabitem, like a stardard button control, and not one that inherits from radcontrols?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 08 Sep 2008, 04:32 PM
Hi iduarte,

Sure, you can. RadTabStrip supports two different modes of work - tab strip and tab control modes. Its default mode is tab control as the EnableHostControlMode property is true. The main difference between these two modes is that the first one is not able to host any controls in its tab items where the purpose of the second one is to host controls.
You can add a control to a TabItem in two ways - design mode and by code:

  • Add a control to a TabItem in design mode. 
    1. Drag and Drop a new instance of RadTabStrip
    2. Add a few tab items
    3. Select a TabItem
    4. Drag and Drop a control into the surface below the TabItem. This surface represents a panel control which is the container of the controls and is associated with the tab item
  • Add a control to a TabItem by code
  1. Drag and Drop a new instance of RadTabStrip
  2. Add a few tab items
  3. Select a TabItem
  4. TabItem has the ContentPanel property which represents the container panel of the controls. ContentPanel is a bit enhanced Microsoft Panel and includes its standard behavior. So to add a control to the panel you can write: this.tabItem1.ContentPanel.Controls.Add(control)
If you have additional questions, feel free to contact me.

Kind regards,
Boyko Markov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Tabstrip (obsolete as of Q2 2010)
Asked by
iduarte
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Share this question
or