Set split panel height to 0

3 posts, 0 answers
  1. Yury Babaev
    Yury Babaev avatar
    5 posts
    Member since:
    Feb 2010

    Posted 16 Aug 2010 Link to this post

    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?
  2. Yury Babaev
    Yury Babaev avatar
    5 posts
    Member since:
    Feb 2010

    Posted 16 Aug 2010 Link to this post

    Oops, I achieved desired behavior by setting "Collapsed" property of the panel, so my problem is solved.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 19 Aug 2010 Link to this post

    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
Back to Top