I want to change to the SWITCH custom style of CheckBox

Answered
0
0

Hello.
CheckBox SWITCH style Attachment html style
Please tell me how to change to.

Attachment
  • You must to post comments
Best Answer
0
0

You’ll need to change it for both the div and the label (see attached).

Best,

Levie

Attachment
  • You must to post comments
0
0

Levie (ITG)
Thank you

I have an additional question.
When creating a custom switch control with a widget
In this.container.innerHTML in initScript
Because ElementById is embedded directly
Multiple custom switch controls on the page
When you make a copy, all the controls are the first one
Bug in custom switch control event
Occurs.

  • Levie (ITG)
    Hi Takao, you can get a unique id for each widget by calling this.getId() in the initScript. Inside the container HTML, use something like this.getID() + “_myCheckBox” or something similar. I’ll also try to work up a sample for you that shows how to do all of this with the Wisej Checkbox (Switch appearance). Best, Levie
  • You must to post comments
0
0

If you want to set the checked state from the server you can add a “checked” property to the Widget’s Options.

In your Widget’s InitScript from the sample you can get/set it by doing something like this:

checkbox.checked = options.checked;

 

On the server, you can do

myCheckboxWidget.Options.checked = true | false;
  • You must to post comments
0
0

Hi Takao,

The simplest way to use your custom switch checkbox is through the Widget control. I’ve attached a sample that shows how you can implement it and fire the events back to Wisej.

Alternatively, you can play around with the Wisej ThemeBuilder to create a custom theme or mixin for a checkbox (switch) with a different background color, switch button size, animation, etc. but it would be a bit more complicated to make that label show on the inner part of the switch.

If you need that solution, please let me know, but I think the Widget solution should be fine for your case.

Best regards,

Levie

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.