In some instances, you might want to keep users from resizing a panel past a certain point. In Panel1, for example, you may have a stack of buttons that you want visible at all times. When confronted with that sort of situation, you can use the MinWidth property to specify, in pixels, the size of the area that you don't want users to drag past. In this topic, you will learn how to set the MinWidth property in Design view and in Code view.
For more information on panel sizing, see SplitterPanel and Splitter Bar Sizing.
Complete the following steps:
Complete the following steps:
Visual Basic
Visual Basic |
Copy Code
|
---|---|
Imports C1.Win.C1SplitContainer |
To write code in C#
C# |
Copy Code
|
---|---|
usingC1.Win.C1SplitContainer; |
Visual Basic
Visual Basic |
Copy Code
|
---|---|
Panel1.MinSize = 30 |
To write code in C#
C# |
Copy Code
|
---|---|
Panel1.MinSize = 30; |
Once you've built the project, drag the splitter bar to the left and observe that it remains at 30 pixels.