Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Background color in TBitBtn

1,260 views
Skip to first unread message

Hervé Roz

unread,
May 25, 1998, 3:00:00 AM5/25/98
to

Does anybody know how to change the background color of a TBitBtn button
with Delphi 3 ?.... (There is no property Color !...).

Thanks for answers.

Darren W. Clarke

unread,
May 25, 1998, 3:00:00 AM5/25/98
to

Windows95 removed the ability to set specific colours for buttons,
scrollbars and some other items and lumped them all into one '3D Objects'
category. If you want to do this I think you'll have to change the
TBitBtn.Brush.Color property value.

Darren Clarke

Earl F. Glynn

unread,
May 25, 1998, 3:00:00 AM5/25/98
to

Hervé Roz wrote in message <6kb7a3$mdj$1...@newsfeed.inetway.net>...

>Does anybody know how to change the background color of a TBitBtn button
>with Delphi 3 ?.... (There is no property Color !...).
>
>Thanks for answers.

Bill Gates doesn't want you to change the colors of buttons in Windows.


This is somewhat of a kludge workaround: Use a TPanel as a "button" since
you can change its color. Then just add a TImage on top of the TPanel for
your button image (sorry, it doesn't handle the various states, i.e.,
enabled and disabled).

efg
_________________________________________
efg's Computer Lab: http://infomaster.net/external/efg

Earl F. Glynn E-Mail: Earl...@att.net
MedTech Research Corporation, Lenexa, KS USA


Kerstin Thaler

unread,
May 25, 1998, 3:00:00 AM5/25/98
to

Hi,

either I'm blind or...I don't know
This question comes on very often or a similar regarding a TButton and
each time someone wrote "use a TBitBtn and change the Brush.Color". I
can't see that it helps and when I look at the code I think it's
impossible to solve the problem in this way. There isn't a variable of
type TColor. All used colors are static. (at least in Delphi 3)
The only possibility I found to get an other background in a TBitBtn is
to use a Glyph what is a little bit smaller then the button itself, but
then there is no place for the *right* glyph or a caption.
It seems to me you should change the code of TBitBtn or write an own
component.
Please correct me if I'm wrong.

Regards

Kerstin


Darren W. Clarke wrote:
>
> Windows95 removed the ability to set specific colours for buttons,
> scrollbars and some other items and lumped them all into one '3D
> Objects'
> category. If you want to do this I think you'll have to change the
> TBitBtn.Brush.Color property value.
>
> Darren Clarke
>
> Hervé Roz wrote:
>

0 new messages