SpreadJS supports a CheckBox form control.
Add a CheckBox form control:
let checkBox = sheet.shapes.addFormControl('check box', GC.Spread.Sheets.Shapes.FormControlType.checkBox, 50, 50, 100, 30);
Set the CheckBox text:
checkBox.text("footerball");
Set the options:
let options = checkBox.options();
options.cellLink = "C1";
checkBox.options(options);
Set the CheckBox fill and line styles:
let style = checkBox.style();
style.fill.type = GC.Spread.Sheets.Shapes.ShapeFillType.solid;
style.fill.color = 'green';
style.fill.transparency = 0.5;
style.line.color = 'red';
style.line.transparency = 0.5;
style.line.width = 2;
checkBox.style(style);
Bind to an event:
sheet.bind(GC.Spread.Sheets.Events.FormControlValueChanged, function (s, args) {
console.log("value changed...", args.newValue);
});
Submit and view feedback for