List view & Rich text box PROBLEMO. Please Help Me!!!
-
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?
-
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?
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
-
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
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
-
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
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
-
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
when i click on the rich text box, how can i get the character number? like 7th character from the start?
-
when i click on the rich text box, how can i get the character number? like 7th character from the start?
The
SelectionStart
property gives you that.SelectionLength
gives the number of characters selected fromSelectionStart
. 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 -
The
SelectionStart
property gives you that.SelectionLength
gives the number of characters selected fromSelectionStart
. 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 | WinMacrothanks for the help. it works now