Flowlayout panel and autosizing child controls doesn't work
- by Pete
I am trying to get a very simple autosizing layout on a winform (C# .NET). I've tried TableLayoutPanels and FlowLayoutPanels but nothing works.
I have a usercontrol which is a container for other usercontrols which are created at runtime - I've called it StackPanel as I want it to list the child controls vertically. I've tried this using a FlowLayoutPanel, TableLayoutPanel and a Panel (with each control docked to the top).
The child usercontrol consists of a label and then any number of radiobuttons (or any other standard control - it doesn't matter).
When the child controls are created, the label text is set (if this is long it needs to wrap to a new line) and the radio buttons are added.
There seems to be no combination of docking/autosizing or manual size setting using the Resize events that can get everything to show without clipping and still resize with the form.
Thanks!