Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Creating Buttons with color change

troberts24troberts24 Member Posts: 1

I am new tp Borland C++ builder and one of the simpler tasks I would like to tackle is adding buttons to my form that have a default color,
lets say green. Upon clicking the button, the text will change but I would also like the color to change to red. The exact colors are not important.

Any suggestions?




  • LundinLundin Member Posts: 3,711
    To customize colors of Windows components is a real pain. This is both Builder's and Windows' fault. Windows for implementing standard components in a retarded way so that you can't recolor them, Builder for being lazy and not delivering colorable standard components desipte that this has been a know issue for over 10 years.

    To get colored buttons, you have these options:

    - Subclassing etc with the Windows API. You will basically have to color the button yourself, manually.

    - Find a component that can do this. There is a "TColorButton" available on the net somewhere.

    - Use bevels to simulate button behavior. This actually works well.
Sign In or Register to comment.