Exemple #1
0
 /// <summary>
 ///   Handles the <see cref="TreeNodeCollection.ItemAdded" /> event of the selected nodes collection.
 /// </summary>
 /// <remarks>
 ///   This highlights the <see cref="TreeNode" /> that was added to the selected nodes collection.
 /// </remarks>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="e">A <see cref="TreeNodeCollection.TreeNodeEventArgs" /> describing the event arguments.</param>
 private void m_tncSelectedNodes_ItemAdded(object sender, TreeNodeCollection.TreeNodeEventArgs e)
 {
     e.TreeNode.BackColor = SystemColors.Highlight;
     e.TreeNode.ForeColor = SystemColors.HighlightText;
 }
Exemple #2
0
 /// <summary>
 ///   Handles the <see cref="TreeNodeCollection.ItemRemoved" /> event of the selected nodes collection.
 /// </summary>
 /// <remarks>
 ///   This unhighlights the <see cref="TreeNode" /> that was removed from the selected nodes collection.
 /// </remarks>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="e">A <see cref="TreeNodeCollection.TreeNodeEventArgs" /> describing the event arguments.</param>
 private void m_tncSelectedNodes_ItemRemoved(object sender,
                                             TreeNodeCollection.TreeNodeEventArgs e)
 {
     e.TreeNode.BackColor = Color.Empty;
     e.TreeNode.ForeColor = Color.Empty;
 }