B4J Question Change button color back to default color

rfresh

Well-Known Member
Licensed User
Longtime User
I've made a temporary change to one of my button colors. How do I change the color back to the default color? I've tried Gray, LightGray, White but none of those are the exact default button color.

Thank you...
 

stevel05

Expert
Licensed User
Longtime User
The standard buttons background color is actually a gradient, if you overwrite it in code, there is no easy way to get it back.

The simplest way is to use a style sheet and style class to change and revert the colors. Or inline styles with a little tricky pruning.

See attached.
 

Attachments

  • btnColorTest.zip
    2.5 KB · Views: 291
Last edited:
Upvote 0

GuyBooth

Active Member
Licensed User
Longtime User
I've made a temporary change to one of my button colors. How do I change the color back to the default color? I've tried Gray, LightGray, White but none of those are the exact default button color.

Thank you...
In the designer, select the existing color code (eg #FFADD8E6) and hit delete:
 
Upvote 0

rfresh

Well-Known Member
Licensed User
Longtime User
The standard buttons background color is actually a gradient, if you overwrite it in code, there is no way to easily get it back.

The simplest way is to use a style sheet and style class to change and revert the colors. Or inline styles with a little tricky pruning.

See attached.
Thank you...
 
Upvote 0
Top