Solved

Component Needed: Color Changing Label

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 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

20 Experts available now in Live!

Get 1:1 Help Now