Hi, i want to override a button background color, for example.
First time it does, but second time it does not.
http://webix.com/snippet/7c5011bb
Can you help me please?
Thanks and regards!
Hi, i want to override a button background color, for example.
First time it does, but second time it does not.
http://webix.com/snippet/7c5011bb
Can you help me please?
Thanks and regards!
Any help about this?
please, tell me you are with this too… I can wait but tell me something please!
Thanks and regards!
I have made another sample about how background color of buttons is not changing second time (from blue to black).
On the other hand, it works when you change from black to blue;
http://webix.com/snippet/e832253e
In my code, this happens when i use background image in button view and i want to change that image from one to another to tell the user which menu option is selected.
Hope it helps!
Thanks and regards!
Using some.define(“css”, value) adds a new CSS class to the view, but it doesn’t remove the old styling. As result the node will have both, old and new CSS classes.
Check the alternative solution
Hi,
How does it work? i mean,
I have a style class called webixtype_black, aplied to normal, hover and active button states.
But when I redefine button class, you called it like:
$$(“black”).config.type = “black”;
But, i have doubts about this last line. I thought you set style to config.type but there is no “black” type. There is a “webixtype_black”
Thanks and regards
The above solution depends on how the button widget works. In addition to “css” property it has a “type” property. There are few predefined type values, but you can define your own types as well.
As result of type changing, a button will receive the CSS class like “webixtype_{type}”. And, the key point, this CSS class always replaces the old one. So you can use this property to replace the old style with a new one.
thanks.
My scenario is a button with a background image Not a background color asociated to a button. Few of them compose a custom menu. So, until now, its type was “image” and i pretended to change that image depending on if it is actived or not.
My solution was to change that css on the fly but i found this…so…
What can i do?
Thanks
Then you may try using webix.html
helper with addCss
and removeCss
methods to add new styling and remove the old one: http://webix.com/snippet/aa8444a8
Thanks It work!! Thank you all very much!
One last thing…about this. That button has a background image and a background color that when clicked (activated), it has a shadow
see this snippet:
http://webix.com/snippet/15b234ca
how can i remove it? i tried box-shadow:none but…no luck.
Thanks and thanks!
regards!