473,386 Members | 1,698 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.

multiple color + font selections in a richtextbox control

hi, im trying to figure out how to get all the font and color selections of a
richt text box. for instance we could have this:

Red (formatted in red color and Arial font)
Green (formatted in green color and Times new Roman font)
Blue (formatted in blue color and Arial narrow font)

so im trying to figure out how i can find the formatting for each one
programmatically.
like, i need to convert the rtf into HTML, which is easy if the entire thing
is the same font or color. but how can i if the fonts and colors are
differrent? thanks
--
-iwdu15
Jul 15 '06 #1
1 1969
I think you have to "scan" each char in the rictextbox.
First scan for colors and create an html equivalent.
Look at the first char and insert "<red>" for example
and scan other chars if they red or not, if you find another color
insert "<newcolor>" and so on...

Then scan for fonts.

Maybe you can scan for both color and font at the same time
to superimpose color and font attributes.

"iwdu15" <jmmgoalsteratyahoodotcomwrote in message news:91**********************************@microsof t.com...
hi, im trying to figure out how to get all the font and color selections of a
richt text box. for instance we could have this:

Red (formatted in red color and Arial font)
Green (formatted in green color and Times new Roman font)
Blue (formatted in blue color and Arial narrow font)

so im trying to figure out how i can find the formatting for each one
programmatically.
like, i need to convert the rtf into HTML, which is easy if the entire thing
is the same font or color. but how can i if the fonts and colors are
differrent? thanks
--
-iwdu15

Jul 16 '06 #2

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

Similar topics

0
by: bill yeager | last post by:
Duray, it helps in regards to knowing how to get the items that were selected in the lisbox, but I'm going in reverse --- after I get the items from the db that were selected, I'd like to be able...
1
by: Able | last post by:
Dear friends It exist a number of various apps displaying multiple selected text. Normally every search function displays all hits as selected text in some sort of text-control. Do somebody know...
2
by: SamSpade | last post by:
I have a user control called TextControl on which I have a RichTextBox control. TextControl1 is an instance of the User Control on a form. I do the following in the form: TextControl1.Font...
7
by: Sakharam Phapale | last post by:
Hi All, How to preserve the old font properties while changing new one? I posted same question 2 months back, but I had very small time then. eg. "Shopping for" is a text in RichTextBox and...
3
by: scott | last post by:
Hello all, I am ripping my hair out over this and maybe someone could help. I have a site that has groups and subgroups of those groups that all have int id's. I am trying to have a...
3
by: bmerlover | last post by:
After hours of trying I got it to print and print preview the richtextbox. I've been trying to figure out how to print multiple pages. If the richtextbox contains more than 1 page of data, than it...
19
by: =?Utf-8?B?QnJpYW4gQ29vaw==?= | last post by:
This is an example of the data; 2007/07/27 11:00:03 ARES_INDICATION 010.050.016.002 404.2.01 (6511) RX 74 bytes 2007/07/27 11:00:03 65 11 26 02 BC 6C AA 20 76 93 51 53 50 76 13 48...
9
by: =?Utf-8?B?QnJpYW4gQ29vaw==?= | last post by:
I want to open a text file and format it into a specific line and then apply color to a specific location of the text and then display it in a RichTextBox after all of this is done. I can do all...
18
by: =?Utf-8?B?TGkgV2VuZw==?= | last post by:
Hi, Is there a way for TreeView to have multiple selections? But I am not talking about its checked boxes. I want a way similar to ListView with MultiSelect = True. So I can use or key and...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.