Panels that don't resize

6 posts, 0 answers
  1. James Relyea
    James Relyea avatar
    13 posts
    Member since:
    Dec 2009

    Posted 11 Dec 2009 Link to this post

    I have a docked RADSplitContainer with 3 panels, 2 horizontal splitters. I only want the middle panel to resize when the form is resized the top & bottom are can not be resized. Will an absolute size take care of that, or do I need to do something else (and what would that be?)?

    Thanks

    :)
    jr
  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 11 Dec 2009 Link to this post

    Hello James Relyea,

    In order to achieve your requirement, it is enough to set the SizeMode to Absolute:

    this.splitPanel1.SizeInfo.SizeMode = Telerik.WinControls.UI.Docking.SplitPanelSizeMode.Absolute;

    You can review an example of such behavior in our Examples application, section SplitContainer >> FirstLook.

    I hope this helps. If you have additional questions, feel free to contact me.

    All the best,
    Nikolay
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. James Relyea
    James Relyea avatar
    13 posts
    Member since:
    Dec 2009

    Posted 11 Dec 2009 Link to this post

    Setting absolute sizes only prevents the panels from resizing as the form resizes. How do I lock the panel from resizing at all? I don't want users to move the splitter bar either and leave the splitter bar visible.

    Thanks
    :)
    jr
  5. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 14 Dec 2009 Link to this post

    Hi James Relyea,

    In order to prevent a panel from resizing, you should fix the splitters that are responsible for the resizing operation. This is demonstrated in the Split Container >> First Look sample as well. Basically, you need to set Fixed property of the desired SplitterElement to true:

    this.radSplitContainer1.Splitters[0].Fixed = true;

    All the best,

    Nikolay
    the Telerik team

     


    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. James Relyea
    James Relyea avatar
    13 posts
    Member since:
    Dec 2009

    Posted 14 Dec 2009 Link to this post

    Is that a code only property, or is there a design time property for it too?

    Thanks for the reply.

    :)
    jr
  7. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 14 Dec 2009 Link to this post

    Hello James Relyea,

    Currently, Splitters cannot be accessed at design-time. We will improve this behavior in one of our next releases. For the time being, please set the Fixed property in code.

    Sincerely yours,

    Nikolay
    the Telerik team

     


    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for WinForms is Visual Studio 2017 Ready