Solved

colored button

Posted on 2001-06-28
7
166 Views
Last Modified: 2010-04-06
Hi all!
i want to use a colored button in my app. (the button' style is the same that a TButton, but i want to be able to choose the foreground color (and i want to keep the caption too!))

thanks, ralph
0
Comment
Question by:ralph78
7 Comments
 
LVL 3

Expert Comment

by:MarcG
ID: 6234444
I don't think it is possible to change the color of a button this easy ... since a button color can be chosen system wide in display properties.
And a button also doesn't have a canvas so you cannot paint yourself on it.
0
 
LVL 3

Expert Comment

by:MarcG
ID: 6234475
maybe here is something for you...
http://www.torry.net/gradientbuttons.htm
0
 
LVL 3

Accepted Solution

by:
MarcG earned 50 total points
ID: 6234506
here is a button with color
http://www.torry.net/buttons.htm
0
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.

 
LVL 1

Expert Comment

by:Kaspars
ID: 6234524
You can create your own button class, publish color property and create custom Paint method. Look in sources:
[$DELPHIDIR]\Source\Vcl\buttons.pas
0
 
LVL 3

Expert Comment

by:tongalite
ID: 6236179
Hi
here is a snip from the description of a color button comp.
I can't recall where I got this... but if you would like me to mail it to you ... leave me an e address and I'll send it to you... it's a good comp and will do everything you want and more:)
T.
***************************

COLORBUTTON COMPONENT VERSION 1.8

COPYRIGHT 1996 JONATHAN GRANT OF INFORMATION EXPRESSIONS

About
This is an enhancement of the standard component issued with Delphi32. Unlike the Delphi component however, this enhanced version gives you much more control over how the button looks on screen.
This release fixes a problem with the redrawing of disabled buttons makes the button respond to messages from the keyboard and accept the focus, as well as supporting accelerator keys too.
0
 

Author Comment

by:ralph78
ID: 6236979
ok tongalite, u can send me this component at ralph78@club-internet.fr
0
 

Author Comment

by:ralph78
ID: 6237034
thanks all!
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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

896 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

15 Experts available now in Live!

Get 1:1 Help Now