Solved

colored button

Posted on 2001-06-28
7
170 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
[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
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
Independent Software Vendors: 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!

 
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

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 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