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. List view & Rich text box PROBLEMO. Please Help Me!!!

List view & Rich text box PROBLEMO. Please Help Me!!!

Scheduled Pinned Locked Moved C#
helpdata-structuresquestion
7 Posts 3 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
    maheshfour
    wrote on last edited by
    #1

    hi all i am having a problem. I have a tree view having some nodes. the same nodes are also present in the rtb(rich text box). what i want to do is that when i click on a perticular node, that node in the rtb should be highlighted. also reverse. can anyone help me in this regards?

    S 1 Reply Last reply
    0
    • M maheshfour

      hi all i am having a problem. I have a tree view having some nodes. the same nodes are also present in the rtb(rich text box). what i want to do is that when i click on a perticular node, that node in the rtb should be highlighted. also reverse. can anyone help me in this regards?

      S Offline
      S Offline
      S Senthil Kumar
      wrote on last edited by
      #2

      Nodes are present in the Richtextbox? What does that mean? Do you have the text of all the nodes in the textbox? If so, you can just subscribe to the Clicked event on the Tree, get the selected node and find the text of the node in the textbox.. Regards Senthil _____________________________ My Blog | My Articles | WinMacro

      M 1 Reply Last reply
      0
      • S S Senthil Kumar

        Nodes are present in the Richtextbox? What does that mean? Do you have the text of all the nodes in the textbox? If so, you can just subscribe to the Clicked event on the Tree, get the selected node and find the text of the node in the textbox.. Regards Senthil _____________________________ My Blog | My Articles | WinMacro

        M Offline
        M Offline
        maheshfour
        wrote on last edited by
        #3

        hi. yes the text of the node is in the rtb. but how can i get a perticular text from a rich text box? thanks for replying

        M 1 Reply Last reply
        0
        • M maheshfour

          hi. yes the text of the node is in the rtb. but how can i get a perticular text from a rich text box? thanks for replying

          M Offline
          M Offline
          mav northwind
          wrote on last edited by
          #4

          You could subscribe to the SelectionChanged event. Then, using the SelectionStart property, you can find out where the new selection is and extract the word from there. Regards, mav

          M 1 Reply Last reply
          0
          • M mav northwind

            You could subscribe to the SelectionChanged event. Then, using the SelectionStart property, you can find out where the new selection is and extract the word from there. Regards, mav

            M Offline
            M Offline
            maheshfour
            wrote on last edited by
            #5

            when i click on the rich text box, how can i get the character number? like 7th character from the start?

            S 1 Reply Last reply
            0
            • M maheshfour

              when i click on the rich text box, how can i get the character number? like 7th character from the start?

              S Offline
              S Offline
              S Senthil Kumar
              wrote on last edited by
              #6

              The SelectionStart property gives you that. SelectionLength gives the number of characters selected from SelectionStart. For the reverse, ie. selecting text when a node is clicked, that's easy, you can just call the Find method on the text box and select it. Regards Senthil _____________________________ My Blog | My Articles | WinMacro

              M 1 Reply Last reply
              0
              • S S Senthil Kumar

                The SelectionStart property gives you that. SelectionLength gives the number of characters selected from SelectionStart. For the reverse, ie. selecting text when a node is clicked, that's easy, you can just call the Find method on the text box and select it. Regards Senthil _____________________________ My Blog | My Articles | WinMacro

                M Offline
                M Offline
                maheshfour
                wrote on last edited by
                #7

                thanks for the help. it works now

                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