Best way to anchor controls that are side by side on a form?

D

David Hearn

I have a form that has several textboxes that sit side-by-side on one
of my forms. If the user expands or maximizes the form, I want the
textboxes to expand with it horizontally. Same thing if they shrink
the form. They need to shrink horizontally. I am having trouble
figuring out the best way to do this. There are approximately five
textboxes in a row.

Thanks in advance!
 
P

Praveen Ramesh

David,

The only way to do this is to listen to the form's Resize event where you
can compute and set the optimal size and location of your 5 textboxes for
the new form size.

Or if you are open to using a 3rd party LayoutManager, a very good one that
does what you want is available as part of Essential Tools:

http://www.syncfusion.com/Products/tools.aspx

Search for Layout Manager package and browse to "FlowLayout".

Regards,
Praveen Ramesh
Syncfusion, Inc.
www.syncfusion.com
 

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