Results 1 to 7 of 7

Thread: ColorPalette? [RESOLVED]

  1. #1

    Thread Starter
    Lively Member lavarock09's Avatar
    Join Date
    Jun 2005
    Posts
    124

    Resolved ColorPalette? [RESOLVED]

    How Do I Use It To Change The Color Of Text in A RichTextBox?
    Last edited by lavarock09; Jun 30th, 2005 at 01:58 PM.

  2. #2
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: ColorPalette?

    VB Code:
    1. RichTextBox1.SelColor = CommonDialog1.Color

    will change the color of the selected text in a richtextbox...im not sure how to change the entire thing

  3. #3

    Thread Starter
    Lively Member lavarock09's Avatar
    Join Date
    Jun 2005
    Posts
    124

    Re: ColorPalette?

    where did

    CommonDialog1

    come from,

    i am asking bout the colorpalette control

  4. #4
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: ColorPalette?

    Sorry, I guess I missread your post..what I was using was using the commondialog control to call up the palette

    VB Code:
    1. commondialog1.showcolor
    2. 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

  5. #5

    Thread Starter
    Lively Member lavarock09's Avatar
    Join Date
    Jun 2005
    Posts
    124

    Re: ColorPalette?

    thanx, that is exactly what i wanted,

    thanx,

    lavarock09

  6. #6
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: ColorPalette?

    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.
    Last edited by dglienna; Jun 30th, 2005 at 03:04 PM.

  7. #7
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: ColorPalette? [RESOLVED]

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width