Solved

Component Needed: Color Changing Label

Posted on 1998-03-14
4
154 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

717 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