Solved

colored button

Posted on 2001-06-28
7
164 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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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