Dorte
Sep 2nd, 2002, 09:04 AM
Hi,
I have a problem when I try to set the color on the
selected text in a Richtextbox. If I have previously set
the color of the selected text to for instance red, and I
afterwards set it to black, there seems to be rtf-codes
left from the "old" color in front of the selected text
(if checking the rtf-property of the richtextbox, there are codes left for foreground color - for instance "\cf1"). This
creates a problem, since the color of the beginning of
that text (or the space in front of it) gets a color-property of "empty" when I check what the color is, and not black as it should be (The color appears to be black visually, though). I need to ensure that all the codes for the "old" color are removed, so the color-property of all the selected text will return "black".
I hope someone will be able to help me.
Thanks,
Dorte
I have a problem when I try to set the color on the
selected text in a Richtextbox. If I have previously set
the color of the selected text to for instance red, and I
afterwards set it to black, there seems to be rtf-codes
left from the "old" color in front of the selected text
(if checking the rtf-property of the richtextbox, there are codes left for foreground color - for instance "\cf1"). This
creates a problem, since the color of the beginning of
that text (or the space in front of it) gets a color-property of "empty" when I check what the color is, and not black as it should be (The color appears to be black visually, though). I need to ensure that all the codes for the "old" color are removed, so the color-property of all the selected text will return "black".
I hope someone will be able to help me.
Thanks,
Dorte