Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 174
  • Last Modified:

colored button

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
ralph78
Asked:
ralph78
1 Solution
 
MarcGCommented:
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
 
MarcGCommented:
maybe here is something for you...
http://www.torry.net/gradientbuttons.htm
0
 
MarcGCommented:
here is a button with color
http://www.torry.net/buttons.htm
0
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!

 
KasparsCommented:
You can create your own button class, publish color property and create custom Paint method. Look in sources:
[$DELPHIDIR]\Source\Vcl\buttons.pas
0
 
tongaliteCommented:
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
 
ralph78Author Commented:
ok tongalite, u can send me this component at ralph78@club-internet.fr
0
 
ralph78Author Commented:
thanks all!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now