Yes, you can set the Index
of a Control
OR User-Control
in Flow-Layout Panel
.
//flPanel is your flow-layout panel...
flPanel.Contorls.Add(ctrl1); //ctrl1 can be any control or user control
flPanel.Contorls.Add(ctrl2); //ctrl2 can be any control or user control
flPanel.Controls.SetChildIndex(ctrl1, flPanel.Controls.GetChildIndex(ctrl2) + 1);
This way, your ctrl1 would be at bottom though it was added first into your Flow-Layout Panel
.
If you have more Control
s, and you are toggling their visibility in different events, then you will have to set Index
for each Control
every time.
I suggest to place your Control
in Panel
and add Panel
in your Flow-Layout Panel
.