Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > SplitContainer > Set split panel height to 0

Not answered Set split panel height to 0

Feed from this thread
  • Yury Babaev avatar

    Posted on Aug 16, 2010 (permalink)

    Hello,

    I have RadSplitContainer with two panels one above another. I need to hide the upper panel when user changes state of a toggle button to "off" and show that panel, when toggle state is changed to "on". The lower panel and it's contents must occupy the whole SplitContainer's surface when the upper one is hidden. I tried the following:

    sp.SizeInfo.SizeMode = Telerik.WinControls.UI.Docking.SplitPanelSizeMode.Absolute;
    sp.SizeInfo.AbsoluteSize = new Size(0, 0);
    But it doesn't work at all. When I change height to "1":
    sp.SizeInfo.AbsoluteSize = new Size(0, 1);
    it works fine, but little nasty 1px width strip is visible. In design-time I can change splitter position so that AbsoluteSize.Width is 0. Also I can change panels height to 0 at runtime manually. Is there any way to do it programmatically?

    Reply

  • Yury Babaev avatar

    Posted on Aug 16, 2010 (permalink)

    Oops, I achieved desired behavior by setting "Collapsed" property of the panel, so my problem is solved.

    Reply

  • Julian Benkov Julian Benkov admin's avatar

    Posted on Aug 19, 2010 (permalink)

    Hello Yury Babaev,

    This the right approach to hide the panel. I am glad to hear that you have solved the issue yourself. 

    Best wishes,
    Julian Benkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > SplitContainer > Set split panel height to 0
Related resources for "Set split panel height to 0"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]