How can I return to the default backgroud color of a button?
something like elements.button.bgcolor = DEFAULT …
The only way is to copy it to another button with the DEFAULT backgroud color?
How can I return to the default backgroud color of a button?
something like elements.button.bgcolor = DEFAULT …
The only way is to copy it to another button with the DEFAULT backgroud color?
I think the only way is to get the bgcolor from an untouched button, yes.
Use the following code
elements.button.bgcolor = '#default';
mmm doesn’t work for me (servoy 3.1.3)
The backgroud become white
and what about background = null
I tested it before in servoy 2.2.7 only on a label (a button is a special kind of label object).
Now I tested it on a button and a label in Servoy 3.1.3 and the label works as advertised. The button background however gives different results depending on the LAF being used.
For instance the Mac OS X LAF doesn’t show any bgcolor in a button, whatever you set it to.
Kunstoff LAF does show the bgcolor and setting it to ‘#default’ or null both gives it the original color back.
What LAF do you use ?
default LAF…
I try also with the windows LAF but the result is the same…
For now I copy the bgcolor to another elements…
you could place a temporary button on your form that when clicked it runs a method that gets the color of the button(when the button’s bg color is default) then put a break point so you can see the value in debug mode. then just make a global variable in your solution that contains that value. doing that I get ‘#ece9d8’. then delete the button and the method.
yes, yes it isn’t a problem, is just strange that there isn’t a #default value