Link to home
Start Free TrialLog in
Avatar of maxb
maxb

asked on

Component Needed: Color Changing Label

Hi, I need a label or anything else that can support this option and is able to be centered on a form.
The component must have some kind of text property where i can change the color of individual letters one by one
in a word but without changing the whole word. Let me know where i can find this.
maxb
Avatar of puppy
puppy

hi maxb,
here is my answer:
1.put a label.
2.change the label caption.
3.choose the event that you want
and put this source:
label1.font.color:={your color};

daniel.
You could do this with a component derived from TPanel. Set the Bevel properties to bvNone and overwrite the Paint-handler.
Use the Canvas.TextRect while changing the Canvas.Font.Color property for each letter and determine the coordinates for the next letter with Canvas.TextWidth.

Hope this helps,
Slash/d003303
ASKER CERTIFIED SOLUTION
Avatar of williams2
williams2

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have been there to take a look at /d20free and found:

bwmarqee.zip
gradbtn.zip
graphic.zip
marscap.zip
netgrad.zip
cm20.zip

Some of them are trivial, if this is not what you are looking for, I could easily code one for you.