Dynamically change size of splitContainer Panel

c#

Solution

I haven't tried this. But, I think this should work Make sure that you control is docked to fill the panel.

splitContainer.IsSplitterFixed = false.

splitContainer.DataBindings.Add("Height", <yourcontrol>, "Height")

Problem

I have a splitContainter control with two horizontal panels. The top panel holds a patient identification banner and bottom panel holds related patient documents and a tree-view. The patientBanner control is from the UK's NIH and if you click on a button inside the control (double-down arrows at lower right), it will expand to display more information about the patient's address, phone, email, and allergies. It expands quite nicely, but I don't know how to make the splitContainer adjust so that the top panel can display all of the information. alt text http://www.intellicure.com/files/DocumentManagerScreenShot.jpg

Original source