How to use the elm.Check function in elm

To help you get started, we’ve selected a few elm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kakaroto / e17 / PROTO / elev8 / data / javascript / check.js View on Github external
style: "toggle",
                    icon: logo_icon,
                    label: "Spades",
                    onlabel: "Numbers",
                    offlabel: "Alphabets",
                    weight: { x: -1.0, y: -1.0 },
                    align: { x: -1.0, y: 0.5 },
                    on_change: function(arg) {
                        print("Numbers or Alphabets\n" + elm.datadir);
                    }
                }),
                icon_check: elm.Check({
                    icon: logo_icon_unscaled,
                    label: "Icon no scale",
                }),
                label_check: elm.Check({
                    label: "Label Only"
                }),
                disabled_check: elm.Check({
                    icon: logo_icon,
                    label: "Disabled check",
                    weight: { x: -1.0, y: -1.0 },
                    align: { x: -1.0, y: 0.5 },
                    state: true,
                    enabled: false
                }),
                disabled_icon_only: elm.Check({
                    enabled: false,
                    icon: logo_icon_unscaled
                }),
            }
        })
github kakaroto / e17 / PROTO / elev8 / data / javascript / check.js View on Github external
resizable_up: false,
    resizable_down: false
});

var w = elm.Window({
    title: "Check box demo",
    elements: {
        the_background: elm.Background({
            weight: EXPAND_BOTH,
            resize: true
        }),
        the_box: elm.Box({
            weight: EXPAND_BOTH,
            resize: true,
            elements: {
                icon_sized_check: elm.Check({
                    icon: logo_icon,
                    label: "Icon sized to check",
                    weight: { x: -1.0, y: -1.0 },
                    align: { x: -1.0, y: 0.5 },
                    state: true
                }),
                toggle1: elm.Check({
                    style: "toggle",
                    icon: logo_icon,
                    label: "Spades",
                    onlabel: "Numbers",
                    offlabel: "Alphabets",
                    weight: { x: -1.0, y: -1.0 },
                    align: { x: -1.0, y: 0.5 },
                    on_change: function(arg) {
                        print("Numbers or Alphabets\n" + elm.datadir);
github kakaroto / e17 / PROTO / elev8 / data / javascript / check.js View on Github external
icon_check: elm.Check({
                    icon: logo_icon_unscaled,
                    label: "Icon no scale",
                }),
                label_check: elm.Check({
                    label: "Label Only"
                }),
                disabled_check: elm.Check({
                    icon: logo_icon,
                    label: "Disabled check",
                    weight: { x: -1.0, y: -1.0 },
                    align: { x: -1.0, y: 0.5 },
                    state: true,
                    enabled: false
                }),
                disabled_icon_only: elm.Check({
                    enabled: false,
                    icon: logo_icon_unscaled
                }),
            }
        })
    }
});

var e = elm.realise(w);
github kakaroto / e17 / PROTO / elev8 / data / javascript / naviframe.js View on Github external
push_orange: elm.Button({
                            label: "Orange",
                            weight: EXPAND_BOTH,
                            on_click: button_push,
                        }),
                        push_violet: elm.Button({
                            label: "Yellow",
                            weight: EXPAND_BOTH,
                            on_click: button_push,
                        }),
                        push_green: elm.Button({
                            label: "Green",
                            weight: EXPAND_BOTH,
                            on_click: button_push,
                        }),
                        check: elm.Check({
                            label: "Show title",
                            weight: EXPAND_BOTH,
                            state: true,
                            on_change: function() {
                                win.elements.box.elements.naviframe.title_visible = this.state;
                            }
                        })
                    }
                })
            }
        })
    }
}));
github kakaroto / e17 / PROTO / elev8 / data / javascript / check.js View on Github external
the_background: elm.Background({
            weight: EXPAND_BOTH,
            resize: true
        }),
        the_box: elm.Box({
            weight: EXPAND_BOTH,
            resize: true,
            elements: {
                icon_sized_check: elm.Check({
                    icon: logo_icon,
                    label: "Icon sized to check",
                    weight: { x: -1.0, y: -1.0 },
                    align: { x: -1.0, y: 0.5 },
                    state: true
                }),
                toggle1: elm.Check({
                    style: "toggle",
                    icon: logo_icon,
                    label: "Spades",
                    onlabel: "Numbers",
                    offlabel: "Alphabets",
                    weight: { x: -1.0, y: -1.0 },
                    align: { x: -1.0, y: 0.5 },
                    on_change: function(arg) {
                        print("Numbers or Alphabets\n" + elm.datadir);
                    }
                }),
                icon_check: elm.Check({
                    icon: logo_icon_unscaled,
                    label: "Icon no scale",
                }),
                label_check: elm.Check({
github kakaroto / e17 / PROTO / elev8 / data / javascript / check.js View on Github external
align: { x: -1.0, y: 0.5 },
                    state: true
                }),
                toggle1: elm.Check({
                    style: "toggle",
                    icon: logo_icon,
                    label: "Spades",
                    onlabel: "Numbers",
                    offlabel: "Alphabets",
                    weight: { x: -1.0, y: -1.0 },
                    align: { x: -1.0, y: 0.5 },
                    on_change: function(arg) {
                        print("Numbers or Alphabets\n" + elm.datadir);
                    }
                }),
                icon_check: elm.Check({
                    icon: logo_icon_unscaled,
                    label: "Icon no scale",
                }),
                label_check: elm.Check({
                    label: "Label Only"
                }),
                disabled_check: elm.Check({
                    icon: logo_icon,
                    label: "Disabled check",
                    weight: { x: -1.0, y: -1.0 },
                    align: { x: -1.0, y: 0.5 },
                    state: true,
                    enabled: false
                }),
                disabled_icon_only: elm.Check({
                    enabled: false,
github kakaroto / e17 / PROTO / elev8 / data / javascript / check.js View on Github external
onlabel: "Numbers",
                    offlabel: "Alphabets",
                    weight: { x: -1.0, y: -1.0 },
                    align: { x: -1.0, y: 0.5 },
                    on_change: function(arg) {
                        print("Numbers or Alphabets\n" + elm.datadir);
                    }
                }),
                icon_check: elm.Check({
                    icon: logo_icon_unscaled,
                    label: "Icon no scale",
                }),
                label_check: elm.Check({
                    label: "Label Only"
                }),
                disabled_check: elm.Check({
                    icon: logo_icon,
                    label: "Disabled check",
                    weight: { x: -1.0, y: -1.0 },
                    align: { x: -1.0, y: 0.5 },
                    state: true,
                    enabled: false
                }),
                disabled_icon_only: elm.Check({
                    enabled: false,
                    icon: logo_icon_unscaled
                }),
            }
        })
    }
});