Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #access #controls #specific #tag
ADD COMMENT
Topic
Name
9+1 =