Reputation: 2233
I have made a user control, which contains 7 controls(labels, dateTimePickers and Combobox), which are placed in a row. It looks like this:
Now i need to resize my usercontrol and i wanted to specify minimum width for each element(child control) and i also configured anchors, but when i resize the form, controls overlap each other. How can i configure this properly, or, maybe, i need to use some container for this?
I'll be gratefull for any help!
Upvotes: 0
Views: 2025
Reputation: 335
try to use split container then dock your controls inside the split container
Upvotes: 0
Reputation: 66439
I'd place them all inside one of the WinForms layout containers, such as the TableLayoutPanel
or FlowLayoutPanel
(tutorials here and here).
You'll have to play around to see if they'll work for your situation, but they generally take care of keeping controls separated and prevent unintended overlapping.
Upvotes: 1