Posted by webmaster Guido on September 09, 2005
In Reply to: Changing button background color and/or flashing it posted
by hallinl p12462 on September 08, 2005
Alas, you can't change the color of a Delphi button. Delphi's buttons have the same color as Windows' buttons. This color depends from the Windows version (XP, 2000, 98,...) and from what might have been changed by the user in Windows' "Display Properties".
There is no standard Delphi method to make a button "flash" (such as for example Button1.Flash). But you could imitate flashing by showing and hiding the button's caption (text) every so many milliseconds, under program control. If you are interested in this, let me know and I'll figure out some source code :)
Second solution: imitate a colored button. Use a TPanel component instead, it also has OnClick, OnMouseDown and OnMouseUp events just like a button has, but it also has a Color property.
Last possibility: get a custom button component that has a color property. There are several freeware colored buttons around on the web.
Related Articles and Replies