473,498 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

replacing and changing the color of a character in rich text box

2 New Member
hi.
i want to replace the and change the color of a character in a rich text box. i can replace and change the color of the character but as soon as i replaced the second character the first characters color is loss...how can i maintain the color of all the replaced characters????
Nov 5 '11 #1
2 2225
GaryTexmo
1,501 Recognized Expert Top Contributor
Use the Select method to select the text you want to change, then change the colour of that. I believe that's how I've done it in the past.
Nov 7 '11 #2
mishi khan
2 New Member
plz can u tell me how to replace a specific character on a specific location in richtext box...like ive four a in richtextbox...n i only want to replace two of them and also change their color...ive tried like

for(int s=0; s<richthextbox1.text.lenght; s++)
{
if(ricttextbox1.text[s]== 'a')

{
richtexbox2.text[s]= 'c';
}
}


but this wont work...this gives error that its read only....etc etc..

update:
sorry its
richtextbox1.text[s]='c';
Nov 8 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
4509
by: Tom_ZC | last post by:
I'm writing a find and replace routine for a text editor I'm working on. The editor has a rich text box on the main form (frmMain). The find/replace form is modeled after the one in Word '97/2K. ...
0
2346
by: KevenL | last post by:
I'm trying to insert unicode characters into a VB Rich Text control (in this case, the Full Block character (U+2588 on the character map). If I copy and paste from the character map, the character...
6
1818
by: Brad Allison | last post by:
Hi, I guess I am not understanding something and I have been searching Help in VB, newgroups, etc. I have a simple application that contains just over 300 rich text files (these are breed...
1
2118
by: a_poster | last post by:
I'm making a real-time spell checker that mimics MS Word's real-time spell checking behavior. As the user types into a rich text box, I detect when a word has been misspelled and modify the visual...
1
3388
by: Peter | last post by:
I have written a small terminal app that reads and writes to the serial port. In particular as the data is read from the serial port it is appended to the rich text box. The problem I am...
1
7875
by: supriya | last post by:
Hi all, Is there any way to set the back ground color of text in rich text box.. I dont want to set the entire back ground color of text box but only the place where i have text. actually using...
2
3077
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, Sorry for the long-winded dissertation - but, I have an application where I need to write text to a rich text box using a common method, callable from anywhere in my application. The...
4
5446
by: Neil | last post by:
Just found out that the Microsoft Rich Textbox does not support full text justification, since it's based on Version 1.0 of the RichEdit Window Class, and full text justification is only available...
16
11035
by: Neil | last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text feature does not support: a) full text justification; b) programmatic manipulation. I was hoping that someone might...
4
4937
by: Elliot Fraval | last post by:
Hi All, Environment is VBA code in Access 2007. I am having some problems performing a find and replace on text that originates from a memo field in a table. The code is supposed to take...
0
6993
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7162
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7197
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6881
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.