Haa :)
Ok, basically what you can do is iterate in the Controls collection, and for
each Control see if that control's Controls has elements, if so iterate on
it, see that I'm making a deep first traversal, if you need a wide first you
will need a queue.
Here is the code for it:
void IterateControl(System.Windows.Forms.Control.Contro lCollection
controls )
{
foreach(Control control in controls)
{
if ( control.Controls.Count > 0 )
IterateControl( control.Controls);
//do something with the control.
MessageBox.Show( control.Name);
}
}
private void button2_Click(object sender, System.EventArgs e)
{
IterateControl( Controls);
}
Hope this help,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Alessandro Rossi" <al**************@areaitsrl.com> wrote in message
news:0e****************************@phx.gbl...
Sorry, I have mistaken, my english had some problems :),
i've changed the word "loop" with "scroll"...
Sorry...
Alessandro Rossi