Home All Groups Group Topic Archive Search About

multiple color + font selections in a richtextbox control

Author
15 Jul 2006 4:41 PM
iwdu15
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

Author
16 Jul 2006 9:03 AM
nime
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.

Show quoteHide quote
"iwdu15" <jmmgoalsteratyahoodotcom> wrote in message news:9145EB61-8A8C-46F7-8631-426A3E8E0B77@microsoft.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