I saw someone asked someone to find a control on the specified form, and many answers were used to use the Foreach loop, which is actually in exact. When you want to find the control placed on a groupbox or
On Panel, it is not enough to use foreach.
Private void getFlexGrid (Control Ctrl)
{
FOREACH (Control C)
In Ctrl.Controls)
{
IF (c
Is FlexGrid?
{
// Operation for the control found;
}
IF (c.Controls.count! = 0)
{
GetFlexGrid (c);
}
}
}