Programmatically setting size

4 posts, 1 answers
  1. lkeel
    lkeel avatar
    115 posts
    Member since:
    Jul 2012

    Posted 31 Jul 2009 Link to this post

    I guess I am the only person who can't figure this out, but how do I programmatically set the size of a panel in the splitcontainer?  I have a form that has 2 panels and I want to be able to resize the containers on startup based on size during last use.  I have tried:
    • Setting Panel Heights
    • Setting radSplitContainer1.SplitPanels[?].Height
    • Setting radSplitContainer1.Splitters[0].Location

    I am out of ideas.  Please let me know if this is possible.

  2. Answer
    Boryana avatar
    330 posts

    Posted 04 Aug 2009 Link to this post

    Hello Lee,

    Thank you for contacting us. In order to set size of the RadPanel contained in a RadSplitContainer you can use the following snippet:

    this.radSplitContainer1.SplitPanels["splitPanel1"].SizeInfo.SizeMode = Telerik.WinControls.UI.Docking.SplitPanelSizeMode.Absolute; 
    this.radSplitContainer1.SplitPanels["splitPanel1"].SizeInfo.AbsoluteSize = new Size(150, 0); 

    You can find more information on the topic in our online documentation. It might be also helpful for you to see the code of the RadSpitContainer examples in our demos. The easiest way to resize the split panels on start up depending on the previous use is to save the AbsoluteSize property in a file and then on start up to assign the property the value contained in the file.

    I hope this is helpful. However, if you encounter any further difficulties, please, contact me back.

    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.
  3. lkeel
    lkeel avatar
    115 posts
    Member since:
    Jul 2012

    Posted 04 Aug 2009 Link to this post

    Thank you for your response.  This did solve my problem.
  4. Frank
    Frank avatar
    3 posts
    Member since:
    Jul 2011

    Posted 13 Oct 2011 Link to this post

    Thanks - I found this useful also.
Back to Top