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

  • Thread starter Thread starter David Hearn
  • Start date Start date
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!
 
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
 
Back
Top