2010-01-30 6 views

Répondre

0
void HighlightNodes(TreeNodeCollection nodes) 
{ 
    if (nodes != null) 
    { 
     foreach (TreeNode node in nodes) 
     { 
      // Process sub-nodes 
      if (node.Nodes.Count > 0) 
      { 
       HighlightNodes(node.Nodes); 
      } 

      if (criteriaIsMet) 
      { 
       node.BackColor = SystemColors.Highlight; 
      } 
      else 
      { 
       node.BackColor = Color.Empty; 
      } 
     } 
    } 
} 
Questions connexes