How Do I Use It To Change The Color Of Text in A RichTextBox?
Printable View
How Do I Use It To Change The Color Of Text in A RichTextBox?
VB Code:
RichTextBox1.SelColor = CommonDialog1.Color
will change the color of the selected text in a richtextbox...im not sure how to change the entire thing
where did
CommonDialog1
come from,
i am asking bout the colorpalette control
Sorry, I guess I missread your post..what I was using was using the commondialog control to call up the palette
VB Code:
commondialog1.showcolor RichTextBox1.SelColor = CommonDialog1.Color
that will bring up the colorpalette and set the color to the selected text
if you dont have common dialog control on your toolbar, you can add it by right clicking on the toolbar, selecting add control, and then finding "Microsoft Common Dialog Control 6.0" and adding it to the toolbar.
If this wasnt what you wanted, sorry, this is the only way I know how to bring up the color palette ;)
thanx, that is exactly what i wanted,
thanx,
lavarock09
You can use .SelColor = Color4 where Color4 is a Long. I let clients choose what colors they use using the color picker. You can also use vbRed.
EDIT: Color4 is vbRed. :)
David, what in the hell is Color4 (I can see that it's a long var) ???
If you suggest something then you better be descriptive or you will confuse people otherwise.