Click here to Skip to main content
16,018,637 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello everyone
i want to click each token in a richtextbox and then display that clicked token in message box...
is there any way to click individual token in richtextbox...
kindly help...
Posted

1 solution

You did not tag the UI library you want to use. Let me assume this is WPF (higly recommend).
Also, you did not define what do you call a token.

Use System.Windows.Controls.RichTextBox, it has the property CaretPosition of the type System.Windows.Documents.TextPointer. This class has all for navigation in logical elements of the document structure.

—SA
 
Share this answer
 
Comments
haseebsvirgo 28-Mar-11 7:55am    
dear by token means the words in a string....
Sergey Alexandrovich Kryukov 28-Mar-11 10:25am    
Great. My advice works.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900