Answers for "get access to all controls with a specific tag in C#"

C#
0

get access to all controls with a specific tag in C#

private void FindTag(Control.ControlCollection controls)
{
    foreach (Control c in controls)
    {
        if (c.Tag != null)
        //logic

       if (c.HasChildren)
           FindTag(c.Controls); //Recursively check all children controls as well; ie groupboxes or tabpages
    }
}
Posted by: Guest on November-02-2020

Code answers related to "get access to all controls with a specific tag in C#"

C# Answers by Framework

Browse Popular Code Answers by Language