This is a migrated thread and some comments may be shown as answers.

Set split panel height to 0

2 Answers 352 Views
SplitContainer
This is a migrated thread and some comments may be shown as answers.
Yury Babaev
Top achievements
Rank 1
Yury Babaev asked on 16 Aug 2010, 11:36 AM
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 Answers, 1 is accepted

Sort by
0
Yury Babaev
Top achievements
Rank 1
answered on 16 Aug 2010, 11:41 AM
Oops, I achieved desired behavior by setting "Collapsed" property of the panel, so my problem is solved.
0
Julian Benkov
Telerik team
answered on 19 Aug 2010, 10:26 AM
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
Tags
SplitContainer
Asked by
Yury Babaev
Top achievements
Rank 1
Answers by
Yury Babaev
Top achievements
Rank 1
Julian Benkov
Telerik team
Share this question
or