Newbie question resizing controls on a form

E

E®!k \\/!sser

Hi all,
I have been playing around with several anchor settings, but I seem not able
to find a solution for the following:
I have a form with all kind of controls. The whole form is build datadrivin
so I know 'nothing' about the form at compiletime
Resizing the form, the grid and/or multi-line textbox should grow and shrink
Other controls, with a fixed height should only get a new position.

Now when a form has a
multi line textbox
single line textbox
single line textbox
multi line textbox

To be able to size the height of the multiline controls, the anchor is set
to top and bottom.
But with these settings, the other controls end up behind these controls.

So my questions is, how to set the anchor (or other properties) so one part
of the controls can size in height according to the size of the form?

kind regards,

Erik
 
A

Alberto Poblacion

E®!k \/!sser said:
So my questions is, how to set the anchor (or other properties) so one
part of the controls can size in height according to the size of the form?

You can place on your form either a FlowLayoutPanel or a
TableLayoutPanel, depending on the effect that you want to achieve. Then you
place your controls on the cells of the corresponding 'LayoutPanel and you
play with the various properties of the cells in the panel to determine how
each cell will resize (you can specify a percentage of the total size, or a
fixed size in pixels, for each row and column of the TableLayoutPanel). You
can anchor each control inside its cell, or set its "dock" property so that
it will automatically fill up its cell.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top