Solved

Component Needed: Color Changing Label

Posted on 1998-03-14
4
150 Views
Last Modified: 2010-04-06
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
0
Comment
Question by:maxb
  • 2
4 Comments
 

Expert Comment

by:puppy
ID: 1360499
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.
0
 
LVL 4

Expert Comment

by:d003303
ID: 1360500
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
0
 
LVL 3

Accepted Solution

by:
williams2 earned 200 total points
ID: 1360501
I think you should have a look at:

ftp://ftp.cdrom.com/public/programming/delphi/ftp/d10free/
or
ftp://ftp.cdrom.com/public/programming/delphi/ftp/d20free/

Most of the examples are for Delphi 1.0/2.0 use, but are working excellent in Delphi 3.0 .

The examples concerns mostly visual components and upgraded DB-components.

There're especially many TLabel descendants. So go enjoy yourself.
0
 
LVL 3

Expert Comment

by:williams2
ID: 1360502
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.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now