Hi,
I'm trying to get the following scenario to work:
A horizontal splitter with the top area a dock Top, and the bottom area a dock Fill, such that the bottom area sizes to fill when the control is resized. When the collapse button is pressed I want the bottom area to collapse.
As far as I can tell the area which collapses is controlled by the dock property of the splitter. However, if I set the splittler dock to Bottom then it no longer exists between the two areas but sort of hangs around sulking at the bottom of the control. A bottom docked splitter seems to only work if the bottom panel is docked bottom (except I want the bottom panel to size to fill).
(I am only using version 10.3 but haven't seen anything in the release notes to make me think that this behaviour changes in later versions)
Can anyone help me?
Hello Suelyn,
The 'UltraSplitter' control cannot be docked to 'Fill'. What I understand after reading your post is that you want the bottom panel to take the rest of the space all the way to the top.
I think that you have to do this manually, by increasing its height, I cannot think of any other way around this.
Please feel free to let me know if I misunderstood you or if you have any other questions.
I was able to get the effect I wanted with a bit of fiddling in the collapsed changed event (and if possible please pass on to the correct people that a collapsed changing event would have been really nice).
if (mInCollapseChanged) return; mInCollapseChanged = true; try { bool collapsed = ultraSplitter1.Collapsed; if (ultraSplitter1.Collapsed) { ultraSplitter1.Collapsed = false; } if (!collapsed) { this.Controls.Clear(); this.Controls.Add(this.ultraPanel1); this.Controls.Add(this.ultraSplitter1); this.Controls.Add(this.ultraPanel2); ultraPanel2.Dock = DockStyle.Top; ultraPanel1.Dock = DockStyle.Fill; ultraSplitter1.Dock = DockStyle.Top; } else { this.Controls.Clear(); this.Controls.Add(this.ultraPanel2); this.Controls.Add(this.ultraSplitter1); this.Controls.Add(this.ultraPanel1); ultraPanel1.Dock = DockStyle.Bottom; ultraSplitter1.Dock = DockStyle.Bottom; ultraPanel2.Dock = DockStyle.Fill; } if (collapsed) { ultraSplitter1.Collapsed = true;
} } finally { mInCollapseChanged = false; }
Hello,
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.