Icon on treeview does not refresh until I move away from a node. Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nitin Parulekar

    #1

    Icon on treeview does not refresh until I move away from a node. Help

    I have assigned icons to nodes of a TreeView during initial loading. Subsequently, when a node is selected, the icon changes to the first in the treeview's ImageList. When moved away from the node, it again displays the correct icon.
    How can I show the correct icon even when the node is selected?

    Environment
    VS 2008 - .Net Framework 3.5
    C#
    Windows Forms
    Any help would be appreciated.
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    I wonder if it's just not repainting. In the method that assigns the icon, try a this.Invalidate () call and see what happens.

    Comment

    Working...