|
|
Title | SplitContainer control properties cause errors |
Description | |
Keywords | SplitContainer splitter, splitter control, VB.NET, VB 2005 |
Categories | Controls, VB.NET |
|
|
When Visual Basic 2005's designer-generated code creates a SplitContainer control, it sets the panel's
properties before it sizes the SplitContainer. That means properties such as
SplitterDistance and Panel2MinSize can lead to illegal values. Visual Basic reports an error in the property values while trying to run the load the form. It's particularly confusing because you can look at the properties in the form designer and see that they have legal values. The error also occurs in designer-generated code not your code and that code is flagged to prevent the debugger from stopping inside it.
To work around this, set properties such as Panel2MinSize in the form's Load
event handler after the form has been initialized.
|
|
|