Solved

Component Needed: Color Changing Label

Posted on 1998-03-14
4
149 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 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

21 Experts available now in Live!

Get 1:1 Help Now