1
Reply

resizing controls dynamically

Ask a question
Thomas

Thomas

12y
1.1k
1
ok, I know how to resize individual controls but I have a puzzle here...

In a windows app I have 4 rectangle controls (graphs) in a 2 x 2 grid that I need to be able to resize with the with the window.

For a Single control I would just use

MyGraph.Location = new Point(12, 56);
MyGraph.Size = new Size(ClientRectangle.Width - 40, ClientRectangle.Height - 155);

Any ideas on how can I calc the new size without causing the graphs to overlap?

Answers (1)