Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. RichText Gradient ColorFill ??

RichText Gradient ColorFill ??

Scheduled Pinned Locked Moved C#
graphicsjsontutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KingTermite
    wrote on last edited by
    #1

    I have RichTextBox with some menu items I've added, like "bold", "italic" ...all the normal stuff. But I'd like to add some cool effect things too. Right now, I'd like to add a color gradient feature that would allow the user to choose two colors and the selected text does a gradient color change from color1 to color2. Kind of like you can do with Yahoo Messenger if you are familiar with Y!Messenger. I've seen an example of doing this with drawing through a built in API call, but is there a way I can do that with RichText (RTF) ? Or can I use a DrawString and convert it to RTF in some easy way? I started out trying to do it manually, but there are a lof of special cases depending on the distance of each color component (R, G and B), and the number of chars, etc... Any ideas?


    There are only 10 types of people in this world....those that understand binary, and those that do not.

    N 1 Reply Last reply
    0
    • K KingTermite

      I have RichTextBox with some menu items I've added, like "bold", "italic" ...all the normal stuff. But I'd like to add some cool effect things too. Right now, I'd like to add a color gradient feature that would allow the user to choose two colors and the selected text does a gradient color change from color1 to color2. Kind of like you can do with Yahoo Messenger if you are familiar with Y!Messenger. I've seen an example of doing this with drawing through a built in API call, but is there a way I can do that with RichText (RTF) ? Or can I use a DrawString and convert it to RTF in some easy way? I started out trying to do it manually, but there are a lof of special cases depending on the distance of each color component (R, G and B), and the number of chars, etc... Any ideas?


      There are only 10 types of people in this world....those that understand binary, and those that do not.

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      Check this, it's probably not exactly what you are looking for but pretty close. Give it a shot: Your first C# control[^] -Nick Parker

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups