Article View: borland.public.cppbuilder.nativeapi
Article #12375Re: Button color
From: Remy Lebeau (TeamB)
Date: Thu, 04 Dec 2003 23:00
Date: Thu, 04 Dec 2003 23:00
23 lines
1924 bytes
1924 bytes
"Andre Letourneau" <aletourneau@tqs.qc.ca> wrote in message news:3fcfb816$1@newsgroups.borland.com... > I'm trying to change the color of a BitBtn at runtime using: TBitBtn (and TButton) do not support custom coloring. In the case of TBitBtn, it is an owner-drawn button, but its coloring is hard-coded. When the button is down, the color is hard-coded to clBtnFace. When the button is up, DrawFrameControl() is used, which does its own coloring based on the OS's settings in the Control Panel. For what you ask, you will just have to do one of the following: 1) make your own descendant class that does your own drawing manually 2) use a third-party button component that supports custom coloring 3) use a TPanel instead to simulate a button, using its OnMouseDown and OnMouseUp events to manipulate its Bevel properties. Gambit
Technical Details
Message-ID:
<3fcfbb83$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-05!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fcfb816$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,c19ae452cac8e99 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-12-04 15:12:05 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fcfb816$1@newsgroups.borland.com> Subject: Re: Button color Date: Thu, 4 Dec 2003 15:00:30 -0800 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 67.23.78.224 Message-ID: <3fcfbb83$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1070578563 67.23.78.224 (4 Dec 2003 14:56:03 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-05!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail