Custom Checkbox

Hi, i’m trying to create a custom checkbox with a css,
here’s the example:
http://webix.com/snippet/2f9c39da
the problem is that the event’s attacched to the checkbox doesn’t work.
help pls

Hi, you need to handle click events on the checkbox to toogle its value.

I suggest creating a custom component that inherits from Webix checkbox but uses its own template and css-specific on_click handler.

Check the snippet, please http://webix.com/snippet/cea87c4d

Thanks, love you!

Hi how do I use this in an application?

Just copy-paste the protoUI code from the snippet in your app, and use view:“slidebox” instead of view:“checkbox” where necessary ( it has the same API, and can be used in form and other places )

How can use it as an activecontent in a datatable column

Hi @IbrahimShaarany ,

This sample is a bit outdated. The actual implementation is stored at our GitHub as an additional slidebutton component.
It can be used in datatable as any other Webix input:

https://webix.com/snippet/ce829651

Please note that starting from Webix 5.2 (scheduled for the end of this month) the similar component will be added in the main library as the ui.switch control.

Many Thanks