Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. TreeView Help

TreeView Help

Scheduled Pinned Locked Moved C#
helpc++question
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Micu Radu
    wrote on last edited by
    #1

    The problem I have is that I want some icons to be changed...When I expand a Node I want for it another icon then the default when I click a Node that does not have subNodes I want another icon for it, I have tried but it wont work when I expand the node the icon appears somewhere else... Pls help... And how can I make the right click of mouse to select a TreeNode like the left click.. PS:English is not my native language so pls excuse me! (o)(o)

    Mircea PuiuM 1 Reply Last reply
    0
    • M Micu Radu

      The problem I have is that I want some icons to be changed...When I expand a Node I want for it another icon then the default when I click a Node that does not have subNodes I want another icon for it, I have tried but it wont work when I expand the node the icon appears somewhere else... Pls help... And how can I make the right click of mouse to select a TreeNode like the left click.. PS:English is not my native language so pls excuse me! (o)(o)

      Mircea PuiuM Offline
      Mircea PuiuM Offline
      Mircea Puiu
      wrote on last edited by
      #2

      1. Use GetTreeCtrl() to work with the CTreeCtrl object. I assume you used already the CTreeCtrl::SetImageList() function. Now use the CTrreCtrl::SetItem() function where you specify the wanted number values for the nImage and nSelectedImage parameters. 2. Derive a class form CTreeCtrl (let it be CMyTreeCtrl), change your object declaration from: CTreeCtrl m_MyTree; into CMyTreeCtrl m_MyTree (or whatever you have there :-)). Now you can use the wizard to add a handler for the right click event (and a lot of other events). Spe sa te ajute :-)) SkyWalker

      M 1 Reply Last reply
      0
      • Mircea PuiuM Mircea Puiu

        1. Use GetTreeCtrl() to work with the CTreeCtrl object. I assume you used already the CTreeCtrl::SetImageList() function. Now use the CTrreCtrl::SetItem() function where you specify the wanted number values for the nImage and nSelectedImage parameters. 2. Derive a class form CTreeCtrl (let it be CMyTreeCtrl), change your object declaration from: CTreeCtrl m_MyTree; into CMyTreeCtrl m_MyTree (or whatever you have there :-)). Now you can use the wizard to add a handler for the right click event (and a lot of other events). Spe sa te ajute :-)) SkyWalker

        M Offline
        M Offline
        Micu Radu
        wrote on last edited by
        #3

        As prefera C# ca VB nu stiu mai deloc si nu prea inteleg dar am prins ideea! (o)(o)

        M 1 Reply Last reply
        0
        • M Micu Radu

          As prefera C# ca VB nu stiu mai deloc si nu prea inteleg dar am prins ideea! (o)(o)

          M Offline
          M Offline
          Micu Radu
          wrote on last edited by
          #4

          Plus ca asta nu cred ca rezolva problema pt ca nodul pe care fac click dreapta nu o sa fie selectat si apoi la evenimentul after_select nu o sa apara ca nod selectat! (o)(o)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups