Hi,
I have to dynamically create a RadTabStrip control inside form (form MDI application).
I used this code:
-------------------------------------------------------------------
Telerik.WinControls.UI.RadTabStrip radTabStrip = new Telerik.WinControls.UI.RadTabStrip();
radTabStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(254)))));
radTabStrip.Dock = DockStyle.Fill;
Telerik.WinControls.UI.TabItem t1 = new Telerik.WinControls.UI.TabItem("Tab 1");
Telerik.WinControls.UI.TabItem t2 = new Telerik.WinControls.UI.TabItem("Tab 2");
Telerik.WinControls.UI.TabItem t3 = new Telerik.WinControls.UI.TabItem("Tab 3");
radTabStrip.Items.AddRange(new Telerik.WinControls.RadItem[] { t1, t2, t3 });
t1.ContentPanel.BackColor = System.Drawing.Color.Transparent;
t2.ContentPanel.BackColor = System.Drawing.Color.Transparent;
t3.ContentPanel.BackColor = System.Drawing.Color.Transparent;
Button b1, b2, b3;
b1 = new Button(); b2 = new Button(); b3 = new Button();
b1.Text = "Bottone 1"; b2.Text = "Bottone 2"; b3.Text = "Bottone 3";
t1.ContentPanel.Controls.Add(b1);
t2.ContentPanel.Controls.Add(b2);
t3.ContentPanel.Controls.Add(b3);
radTabStrip.TabsPosition = Telerik.WinControls.UI.TabPositions.Bottom;
this.Controls.Add(radTabStrip);
-------------------------------------------------------------------
This code works, but the control isn't displayed fine! In particular tab buttons are not displayed as they are displayed when i use designer to create RadTabStrip.
What is the best way to solve my problem?
Thank you very much for support.
Lorenzo