473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Formatting text in RichTextBox ...

Hi Guys,

I have a string, say "Hello World" and would like to format the way I want
to (say, wanna have the Hello to be bold italic and the World to be of font
size 14 or so) and put it in the RichTextBox, I created.

Just want to paste or write this string to the RichTextBox; what command
should I use? I used the following command and it did not help ...

richTextBox.SelectionFont = <some font selected>
richTextBox.Text = "Hello World";

Even the Paste() command is of no help as it writes to the RichTextBox in
black color with the default font (even though the color and the font I
applied are totally different. Any help on this is greatly appreciated.
Thanks in advance.

Regards,
Hariharan S

Nov 15 '05 #1
0 1689

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Neil | last post by:
Is there an editable RTF textbox control which allows the user to apply bold, italic, etc.? I tried the Microsoft Rich Textbox Control, but there doesn't seem to be a way to allow the user to...
2
by: Hariharan S | last post by:
Hi Guys, I have a string, say "Hello World" and would like to format the way I want to (say, wanna have the Hello to be bold italic and the World to be of font size 14 or so) and put it in the...
0
by: Radu.Micu | last post by:
I have a RichTextBox on my form and I want to save the text that a user writes into it in a AccessDB but I want to save the formatted text not only plain txt I have seen in some programs that the...
1
by: Kevin | last post by:
Hello, Does anyone know how to implement find and replace in a RichTextBox in a way that does not lose the text formatting? As a first attempt I tried rtb.Rtf.Replace(sFindText,...
2
by: Chris Rollock | last post by:
on msdn: "you can initialize the Rtf property to a string that contains the text to display, including the RTF codes that determine how the text should be formatted." Nowhere can I find an example...
0
by: ronchese | last post by:
Hello All. I'm using the RichTextBox control to show text to user that can do the primary font formatting: fontname, size, color, bold, italic and underline. Unlike the RichTextBox used in VB...
2
by: Mystique | last post by:
Hello Is there any way to format text with tags (something like html tags) in a RichTextBox? Something similar to this: string aStr; aStr = "<b>this is bold</bthis is normal"; ...
3
by: michael sorens | last post by:
The documentation for the RichTextBox is sketchy at best. I want to do a very simple task but I cannot find information on this. I am using a RichTextBox as an output window. Some text I want to...
2
by: drfreaky | last post by:
Hello, I want to use a richtextbox for logging status messages. I have three kind of message types and want to use different formatting for them. My problem is, I change the color, add the text...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...

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.