TreeView

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Wndr

    TreeView

    Hi guys
    I have a treeView
    MainNode
    ChildOfMainNode
    ChildOFMainNode 2
    etc..
    Node2
    Node3
    When I am using the TreeView_AfterS elect function, it's hard fro me to
    distinguish between Nodes:
    For example if I select ChildOfMainNode it has index 0, ChildOfMainNode 2 has
    Index 1;
    Node2 has Index 1 as well, so what is the best way to distinguish between
    Nodes, I assume my way by Index doesn't work. If it's byKey, then how could
    I assign the key to this node?
    Appreciate any help.


  • DH

    #2
    Re: TreeView

    Wndr wrote:
    Hi guys
    I have a treeView
    MainNode
    ChildOfMainNode
    ChildOFMainNode 2
    etc..
    Node2
    Node3
    When I am using the TreeView_AfterS elect function, it's hard fro me to
    distinguish between Nodes:
    For example if I select ChildOfMainNode it has index 0, ChildOfMainNode 2 has
    Index 1;
    Node2 has Index 1 as well, so what is the best way to distinguish between
    Nodes, I assume my way by Index doesn't work. If it's byKey, then how could
    I assign the key to this node?
    Appreciate any help.
    >
    >

    well the e.Nodes.FullPat h will allow you to distinguish between
    different nodes if that is all you are looking for. What exactly are you
    trying to accomplish by figuring out which one.

    Comment

    • Stanimir Stoyanov

      #3
      Re: TreeView

      You can use the Level property (zero-based) to determine of what level is a
      given node. E.g. MainNode would be of zeroth level while
      ChildOfMainNode--first.

      If you could elaborate more on what you are trying to accomplish, we would
      be able to help more.
      --
      Stanimir Stoyanov
      슬롯사이트 리스트중 2025년에도 가장 중요하게 보는것은 안전성과 신뢰성입니다. 슬롯나라를 통해 안전한 온라인카지노 게임을 선택함으로써 먹튀사이트 위험에 보장을 받을 수 있습니다.슬롯나라는 10개의 먹튀검증이 완료된 안전한 온라인카지노를 추천합니다.


      "Wndr" <someone@yahoo. comwrote in message
      news:e1aDVLqPJH A.1148@TK2MSFTN GP05.phx.gbl...
      Hi guys
      I have a treeView
      MainNode
      ChildOfMainNode
      ChildOFMainNode 2
      etc..
      Node2
      Node3
      When I am using the TreeView_AfterS elect function, it's hard fro me to
      distinguish between Nodes:
      For example if I select ChildOfMainNode it has index 0, ChildOfMainNode 2
      has Index 1;
      Node2 has Index 1 as well, so what is the best way to distinguish between
      Nodes, I assume my way by Index doesn't work. If it's byKey, then how
      could I assign the key to this node?
      Appreciate any help.
      >

      Comment

      • Wndr

        #4
        Re: TreeView

        Thanks for both, this is exactly what I was looking for.

        "Stanimir Stoyanov" <stoyanov@REMOV ETHIS.live.comw rote in message
        news:A987ED80-FE33-4683-8D71-40F74EC589E6@mi crosoft.com...
        You can use the Level property (zero-based) to determine of what level is
        a given node. E.g. MainNode would be of zeroth level while
        ChildOfMainNode--first.
        >
        If you could elaborate more on what you are trying to accomplish, we would
        be able to help more.
        --
        Stanimir Stoyanov
        슬롯사이트 리스트중 2025년에도 가장 중요하게 보는것은 안전성과 신뢰성입니다. 슬롯나라를 통해 안전한 온라인카지노 게임을 선택함으로써 먹튀사이트 위험에 보장을 받을 수 있습니다.슬롯나라는 10개의 먹튀검증이 완료된 안전한 온라인카지노를 추천합니다.

        >
        "Wndr" <someone@yahoo. comwrote in message
        news:e1aDVLqPJH A.1148@TK2MSFTN GP05.phx.gbl...
        >Hi guys
        >I have a treeView
        >MainNode
        > ChildOfMainNode
        > ChildOFMainNode 2
        > etc..
        >Node2
        >Node3
        >When I am using the TreeView_AfterS elect function, it's hard fro me to
        >distinguish between Nodes:
        >For example if I select ChildOfMainNode it has index 0, ChildOfMainNode 2
        >has Index 1;
        >Node2 has Index 1 as well, so what is the best way to distinguish between
        >Nodes, I assume my way by Index doesn't work. If it's byKey, then how
        >could I assign the key to this node?
        >Appreciate any help.
        >>
        >

        Comment

        • SMJT

          #5
          Re: TreeView

          On Nov 4, 8:05 pm, "Wndr" <some...@yahoo. comwrote:
          Thanks for both, this is exactly what I was looking for.
          >
          "Stanimir Stoyanov" <stoya...@REMOV ETHIS.live.comw rote in message
          >
          news:A987ED80-FE33-4683-8D71-40F74EC589E6@mi crosoft.com...
          >
          >
          >
          You can use the Level property (zero-based) to determine of what level is
          a given node. E.g. MainNode would be of zeroth level while
          ChildOfMainNode--first.
          >
          If you could elaborate more on what you are trying to accomplish, we would
          be able to help more.
          --
          Stanimir Stoyanov
          http://stoyanoff.info
          >
          "Wndr" <some...@yahoo. comwrote in message
          news:e1aDVLqPJH A.1148@TK2MSFTN GP05.phx.gbl...
          Hi guys
          I have a treeView
          MainNode
             ChildOfMainNode
             ChildOFMainNode 2
             etc..
          Node2
          Node3
          When I am using the TreeView_AfterS elect function, it's hard fro me to
          distinguish between Nodes:
          For example if I select ChildOfMainNode it has index 0, ChildOfMainNode 2
          has Index 1;
          Node2 has Index 1 as well, so what is the best way to distinguish between
          Nodes, I assume my way by Index doesn't work. If it's byKey, then how
          could I assign the key to this node?
          Appreciate any help.- Hide quoted text -
          >
          - Show quoted text -
          Wndr

          Just in case you need to search for a particular tree node you might
          also want to set the Name property on each of the nodes, as the nodes
          are keyed using that property. Obviously it would be best to be
          unique, using the FullPath say. If you want to use the IndexOf of
          Find functions on the treeview or node it would require the key to be
          set.

          SMJT

          Comment

          Working...