summaryrefslogtreecommitdiff
path: root/src/examples/table_example_02.js
blob: af51ec793a35a88d6802245dcacdc37e9ef56d65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

efl = require('efl');
elm = require('elm');

win = new elm.Elm.WinStandard(null);
win.setTitle("Table");
win.setAutohide(true);

table = new elm.Elm.Table(win);
win.resizeObjectAdd(table);
table.setVisible(true);
table.setHomogeneous(false);

rect = new efl.Evas.Rectangle(win);
rect.setColor( 255, 0, 0, 255)
rect.setSizeHintMin( 100, 50);
rect.setVisible(true)
table.pack(rect, 0, 0, 2, 1);

rect2 = new efl.Evas.Rectangle(win);
rect2.setColor( 0, 255, 0, 255)
rect2.setSizeHintMin( 50, 100);
rect2.setVisible(true)
table.pack(rect2, 0, 1, 1, 2);

rect3 = new efl.Evas.Rectangle(win);
rect3.setColor( 0, 0, 255, 255)
rect3.setSizeHintMin( 50, 50);
rect3.setVisible(true)
table.pack(rect3, 1, 1, 1, 1);

rect4 = new efl.Evas.Rectangle(win);
rect4.setColor( 255, 255, 0, 255)
rect4.setSizeHintMin( 50, 50);
rect4.setVisible(true)
table.pack(rect4, 1, 2, 1, 1);

win.setVisible(true);