Here is an example using a standard TextBox. Descendants gets all controls on a form no matter where they are and TextBoxList in this case filters down to TextBox controls so model one for your custom control.
public static class ControlExtensions
{
public static IEnumerable<T> Descendants<T>(this Control control) where T : class
{
foreach (Control child in control.Controls)
{
if (child is T thisControl)
{
yield return (T)thisControl;
}
if (child.HasChildren)
{
foreach (T descendant in Descendants<T>(child))
{
yield return descendant;
}
}
}
}
public static List<TextBox> TextBoxList(this Control control)
=> control.Descendants<TextBox>().ToList();
}
In a form
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.TextBoxList().ForEach(tb =>
tb.Click += delegate (object tb, EventArgs args) {
Debug.WriteLine(((TextBox)tb).Name);
});
}
}