[英]Finding control in Windows Forms panel
I need to find a child control in a Windows Forms panel. 我需要在Windows窗体面板中找到一个子控件。 I was wondering if there is a method similar to Panel.FindControl() of the ASP.NET webforms panel in the .NET Windows Forms version.
我想知道是否有一个类似于.NET Windows Forms版本的ASP.NET webforms面板的Panel.FindControl()的方法。
You can achieve like this: 你可以这样做:
mypanel.Controls.Find("mycontrolname",true);
The documentation is here: Control.ControlCollection.Find Method 文档在这里: Control.ControlCollection.Find方法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.