3

I need to find a child control in a Windows Forms panel. I was wondering if there is a method similar to Panel.FindControl() of the ASP.NET webforms panel in the .NET Windows Forms version.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Meli
  • 151
  • 3
  • 13
  • Possible duplicate of *[Find control by name from Windows Forms controls](http://stackoverflow.com/questions/3898588/find-control-by-name-from-windows-forms-controls)* – Peter Mortensen Oct 28 '15 at 13:07

1 Answers1

4

You can achieve like this:

mypanel.Controls.Find("mycontrolname",true);

The documentation is here: Control.ControlCollection.Find Method

Giorgi
  • 30,270
  • 13
  • 89
  • 125