By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,264 Members | 1,749 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,264 IT Pros & Developers. It's quick & easy.

multiple color + font selections in a richtextbox control

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.