i have a flowlayoutpanel with anchors to all 4 sides so it scales with the form size. i'm adding some user controls to it dynamicly. i want the user controls to scale with the flowlayoupanel verticaly. i tried this approach:
public void OnSizeChange(object? sender, EventArgs e)
{
foreach (UserControl cont in controls)
{
cont.Width = flowLayoutPanel1.ClientSize.Width - 10;
}
}
and adding this function to form SizeChanged event but this is too laggy when resizing the window. is there a more efficient way to do it?