I just want to ask on how to change a word to another word and change its color in a textbox. For example if I type the word "Yes" in the text box it will change to "NO" and change its color into red at the same time.
Answered by deceptikon 1,790 in a post from
Jump to Post
You can do a simple replace on the string:
textBox.Text = textBox.Text.Replace("Yes", "NO")
Changing the color is a different matter. I assume you want to change only the replaced text to red, which won't work unless you're using a rich text box. If it's just a …
All 4 Replies
azareth 5 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.