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

overlapping controls in tab

2 Answers 221 Views
Toolstrip (obsolete as of Q3 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.
Ken
Top achievements
Rank 1
Ken asked on 24 Apr 2009, 08:26 PM
*Edit* I meant to post this in tabstrip not toolstrip.
I have a tab that includes a dynamically created radpanel and tabstrip, I'm having problems with the panel and tabsstrip overlapping.

    Private Sub AddTab() 
        'Add tab to Form 
         
        myTab.Children(2).Margin = New Padding(0, 0, 25, 0) 
        myTab.Children.Add(newButton()) 
        myTab.IsSelected = True        
        myTab.ContentPanel.Controls.Add(myTreePanel) 
        myTab.ContentPanel.Controls.Add(myTabStrip) 
        
        myTreePanel.Location = New System.Drawing.Point(0, 0) 
        myTreePanel.Dock = System.Windows.Forms.DockStyle.Left 
               
        myTabStrip.Location = New System.Drawing.Point(129, 0) 
        myTabStrip.Dock = DockStyle.Fill 
        myTabStrip.Items.Add(innerTab) 
 
        innerTab.Children(2).Margin = New Padding(0, 0, 25, 0) 
        innerTab.Children.Add(newButton()) 
        innerTab.IsSelected = True 
 
    End Sub 

2 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 27 Apr 2009, 03:40 PM
Hello Ken,

Thank you for the question.

In WinForms, when you want to have a layout where one of the controls is docked to left and the other is filling the remaining space, you should first the control that fills the available space and then the control that is docked to left:
myTab.ContentPanel.Controls.Add(myTabStrip)  
myTab.ContentPanel.Controls.Add(myTreePanel) 

I hope this helps. If you have additional questions, feel free to contact me.

Kind regards,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Ken
Top achievements
Rank 1
answered on 27 Apr 2009, 05:40 PM
Thanks, that works.

-Kenny
Tags
Toolstrip (obsolete as of Q3 2010)
Asked by
Ken
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Ken
Top achievements
Rank 1
Share this question
or