Want splitcontainer panels width runtime

  • Thread starter Thread starter Anjali
  • Start date Start date
I am creating splitcontainer at runtime.. want width of panels different.
How can i do that.
As i cant modify splitContainer2 .panel2.width = 100;




From http://www.developmentnow.com/g/36_0_0_0_0_0/dotnet-languages-csharp.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com

Well, the exception you get when you try to set panel2.Width tells you to use SplitterDistance instead. SplitterDistance will set the width of panel1, so if you want to set the width of panel2, set the SplitterDistance to SplitContainer.Width - X where X is the desired width of panel2.
 
Back
Top