Click here to Skip to main content
15,916,463 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,I'm writing a small program to language translation.For that I want a code to select word by word in a rich textbox using a button.
Eg-when the text is 'Hello guys' when I press button once 'hello' should be selected.when I press it again 'guys' should be selected.I don't know how to do this.If I pressed it again it should select 'hello' again.Please give me a simple code.-Thank you!
anuradhapriyankara 10-Feb-12 7:17am    
Thank you for the answer! But can you give me a complete code.I can't understand 'run array on a loop'.I'm really a new to

I would simply use string.Split() and get all the characters in an array.
myarr[] = myrtb.RTF.ToString().Split(" ");

Run a loop on the array and display all the words one by one on button click.
Share this answer
Espen Harlinn 11-Feb-12 5:18am    
Abhinav S 11-Feb-12 8:39am    
Thank you Espen.
Oh!Thank you!This method works good.
Share this answer

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