Article View: borland.public.cppbuilder.nativeapi
Article #12377Re: Button color
From: Andre Letourneau
Date: Thu, 04 Dec 2003 23:27
Date: Thu, 04 Dec 2003 23:27
35 lines
2004 bytes
2004 bytes
TPanel do exactly what I need , Thank you very much for the hint... Andre "Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message news:3fcfbb83$1@newsgroups.borland.com... > > "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:
<3fcfc2c7$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fcfb816$1@newsgroups.borland.com> <3fcfbb83$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:40:07 PST From: "Andre Letourneau" <aletourneau@tqs.qc.ca> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fcfb816$1@newsgroups.borland.com> <3fcfbb83$1@newsgroups.borland.com> Subject: Re: Button color Date: Thu, 4 Dec 2003 18:27:02 -0500 Lines: 37 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 199.243.241.122 Message-ID: <3fcfc2c7$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1070580423 199.243.241.122 (4 Dec 2003 15:27:03 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail