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

Min width how to set?

2 Answers 481 Views
SplitContainer
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 18 Oct 2013, 11:21 AM
How do i set a min um with on split container i have followed the basic demo on here how to setup the splitter so i have left side and a right with to split panels either side what is it i need to set the width so that the user cannot go to some silly width

2 Answers, 1 is accepted

Sort by
0
Kord
Top achievements
Rank 1
answered on 01 Dec 2018, 11:27 PM

Please advise )

I have a  with 4 panels inside it. And I want to limit the width of one of this panels to exact 50 points only.

I had set the MinimumSize and the  of this panel. But these settings have not worked either.

Please advise what I should do!?

 

0
Hristo
Telerik team
answered on 03 Dec 2018, 07:58 AM
Hello Kord,

The Minimum/Maximum size properties need to be set on the SizeInfo object which is used by the control while resizing. The code snippet below will limit the size of the panel to a fixed width: 
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
    public RadForm1()
    {
        InitializeComponent();
         
        this.splitPanel2.SizeInfo.MinimumSize = new Size(50, 680);
        this.splitPanel2.SizeInfo.MaximumSize = new Size(50, 680);
    }
}

You can also consider using only the MinimumSize property to limit the width and allow the panel to be resized to a greater size.

I hope this will help. Let me know if you need further assistance.

Regards,
Hristo
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
SplitContainer
Asked by
Dave
Top achievements
Rank 1
Answers by
Kord
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or