Auto scaling of controls in a form (.Net 2008).

Mar 30 2010 1:16 PM
DESKTOP APPLICATION.

Hi, below is the problem briefed:
In my home form I have a splitcontainer and few buttons. When the buttons are clicked respective forms are
opened in the splitcontainer. The splitcontainer is anchored- top, left, right, bottom so that when the home form is
resized the splitcontainer resizes itself automatically. The controls within the other forms are also anchored
properly to resize themselves accordingly. But the problem is when i open a form in the splitcontainer, even if I
resize the home form, the controls in the form within the splitcontainer aren't resizing. The reason is when the
home form is resized the splitcontainer is resizing itself accordingly but the form inside the splitcontainer isn't (as
forms don't have anchor or dock properties so I couldn't set them). As a result though the controls in the sub form
are anchored to resize themselves yet they aren't. How to solve it.

In short I want the form in the splitcontainer and all the controls in it to resize automatically when the home
form/splitcontainer is resized. Regards.

Answers (1)