Пример #1
0
 the_background : elm.Background ({
     weight : EXPAND_BOTH,
     resize : true,
 }),
 the_conform : elm.Conform ({
     weight : EXPAND_BOTH,
     resize : true,
     content : elm.Box ({
         weight : EXPAND_BOTH,
         align : FILL_BOTH,
         resize : true,
         elements : {
             the_entry : elm.Entry ({
                 text : entry_text,
                 weight : {x:-1.0, y:0.0},
                 align : FILL_BOTH,
                 line_wrap : 3,
                 editable : true,
             }),
             icon_no_scale : elm.Button ({
                 label : "Icon no scale",
                 weight : { x : -1.0, y : -1.0 },
             }),
             the_pass : elm.Entry ({
                 text : "Password",
                 weight : {x:-1.0, y:0.0},
                 editable : false,
                 password : true,
             }),
         },
     }),
Пример #2
0
#!/usr/bin/env elev8

var elm = require('elm');

var EXPAND_BOTH = { x: 1.0, y: 1.0 };
var FILL_BOTH = { x: -1.0, y: -1.0 };

var entry_text = "This is an entry widget in this window.";

var entry = elm.Entry({
    text: entry_text,
    weight: EXPAND_BOTH,
    align: FILL_BOTH,
    line_wrap: 3,
    single_line: 1,
    editable: true
});

var win = elm.realise(elm.Window({
    title: "Notify Example",
    width: 320,
    height: 480,
    weight: EXPAND_BOTH,
    align: FILL_BOTH,
    elements: {
        background: elm.Background({
            weight: EXPAND_BOTH,
            align: FILL_BOTH,
            resize: true
        }),
        box: elm.Box({