Search code examples
delphibuttoncolorsvcltbutton

DELPHI - How to change a TButton background color in a VCL Form Application?


In my Delphi VCL Form Application, I have to change the background color of a TButton. Is there a way to apply this change without using third-party components?

Thanks.


Solution

  • You can't change the color of a TButton component directly, instead you must use a third-party component or owner draw the button (BS_OWNERDRAW).