Panels that don't resize

11 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
    1805 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. 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
  4. Nikolay
    Admin
    Nikolay avatar
    1805 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.
  5. 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
  6. Nikolay
    Admin
    Nikolay avatar
    1805 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.
  7. KKL
    KKL avatar
    15 posts
    Member since:
    Nov 2016

    Posted 22 Jun in reply to Nikolay Link to this post

    Apologies for dredging up an ancient post, but my question really flows on naturally from this. Once a splitter panel is fixed, is there an easy way to remove the size grip graphic and the mouse cursor hover change? 
  8. Hristo
    Admin
    Hristo avatar
    1059 posts

    Posted 26 Jun Link to this post

    Hello,

    Yes, that could be accomplished pretty much easily. The observed behavior is actually an issue and it is logged here: https://feedback.telerik.com/Project/154/Feedback/Details/219855-fix-radsplitcontainer-the-layout-element-holding-the-resizing-grip-and-splitte.

    You can refer to the feedback item for the suggested workaround. The issue is already in development and it will be included in our R3 2017 release. I have updated your Telerik points for the report.

    I hope this helps. Please let me know if you need further assistance.

    Regards,
    Hristo
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  9. KKL
    KKL avatar
    15 posts
    Member since:
    Nov 2016

    Posted 27 Jun in reply to Hristo Link to this post

    Thanks for that. I can't access that link though. 'The page you're looking for isn't here.'

    If the page is protected, can the workaround be posted here? 

  10. Hristo
    Admin
    Hristo avatar
    1059 posts

    Posted 27 Jun Link to this post

    Hi,

    Indeed there was an issue with the link and the feedback portal, now it should work and you can check the item here.

    Just in case, I am also posting the workaround: 
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
     
            new RadControlSpyForm().Show();
     
            this.radSplitContainer1.EnableCollapsing = true;
            this.radSplitContainer1.UseSplitterButtons = true;
        }
     
        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e);
     
            foreach (SplitterElement splitter in this.radSplitContainer1.Splitters)
            {
                splitter.Fixed = true;
                splitter.Layout.Visibility = ElementVisibility.Collapsed;
            }
        }
     
        private void button1_Click(object sender, EventArgs e)
        {
            foreach (SplitterElement splitter in this.radSplitContainer1.Splitters)
            {
                splitter.Fixed = !splitter.Fixed;
                splitter.Layout.Visibility = !splitter.Fixed ? ElementVisibility.Visible : ElementVisibility.Collapsed;
            }
        }
    }
     
    public class MyRadSplitContainer : RadSplitContainer
    {
        public override string ThemeClassName
        {
            get
            {
                return typeof(RadSplitContainer).FullName;
            }
        }
     
        public override Cursor Cursor
        {
            get
            {
                return base.Cursor;
            }
            set
            {
                SplitterElement splitter = this.GetSplitterElementAtPoint(this.PointToClient(Cursor.Position));
                if (!(splitter != null && splitter.Fixed))
                {
                    base.Cursor = value;
                }
            }
        }
    }

    I hope this helps. Please let me know if you need further assistance.

    Regards,
    Hristo
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  11. KKL
    KKL avatar
    15 posts
    Member since:
    Nov 2016

    Posted 27 Jun in reply to Hristo Link to this post

    Thank you for your fast reply!
Back to Top