i am using rich text box in vb.net
-
I want to change the color of all text that i given in inutbox .But when i write code for that ,it chage the first maching word not all. My code is richtextbox1.selectionstart=richtextbox1.find(value) 'value contains the selected text richtextbox.selectioncolor=colordialog1.color I use inputbox for selecting that word .If the richtext box contains that word change the forecolor.But when i using the above code it chage only first selected maching word.
-
I want to change the color of all text that i given in inutbox .But when i write code for that ,it chage the first maching word not all. My code is richtextbox1.selectionstart=richtextbox1.find(value) 'value contains the selected text richtextbox.selectioncolor=colordialog1.color I use inputbox for selecting that word .If the richtext box contains that word change the forecolor.But when i using the above code it chage only first selected maching word.
You've found the first instance of the text, and you've changed it. You need to step through and find the others, to change those too.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )