summaryrefslogtreecommitdiff
path: root/src/YalpClients/EflClient/list.py
blob: e6bd6c3e7c85fee38dab098a54cbfd1d676b8e0c (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env python

import edje
import ecore.evas
import sys
import os
import ecore
import emotion
import elementary
import evas

def huhu(obj, it):
	print "guck guck";

elementary.init();
win = elementary.Window("test", elementary.ELM_WIN_BASIC);
win.title_set("python-elementary test application");
bg = elementary.Background(win);
win.resize_object_add(bg);
bg.show();

box0 = elementary.Box(win);
win.resize_object_add(box0);

items = [("huhu",huhu),
           ("haha", huhu),
           ("hoho", huhu),
           ("hehe", huhu),
           ("hihi", huhu)];

li = elementary.List(win);
li.size_hint_weight_set(1.0, 1.0)
li.size_hint_align_set(-1.0, -1.0)
box0.pack_end(li);
li.show();

for item in items:
	print item[0]
	li.item_append(item[0], None, None, item[1]);

li.go();

#fr = elementary.Frame(win);
#fr.label_set("Information");
#box0.pack_end(fr);
#fr.show();

#lb = elementary.Label(win);
#lb.label_set("Please select a test from the list below<br>");
#fr.content_set(lb);
#lb.show();

win.resize(320,520);
box0.show();
win.show();
elementary.run();
elementary.shutdown();