diff options
| author | Nicole Vreden <damba@slartibartfast.traut> | 2009-12-26 18:47:51 +0100 |
|---|---|---|
| committer | Nicole Vreden <damba@slartibartfast.traut> | 2009-12-26 18:47:51 +0100 |
| commit | 02f2aa17aaaa7fb58aef7db48ff01bf6fd38febc (patch) | |
| tree | 3c73fe897b8c677c14691a988058a766020cd42a /src/YalpClients | |
| parent | 32494fc2b4d46d79e17c8ae32c42350e19edcc37 (diff) | |
Python-Elementary: Lists
- example for lists
- should print huhu if list-element is clicked
Signed-off-by: Nicole Vreden <damba@mecka.net>
Diffstat (limited to 'src/YalpClients')
| -rwxr-xr-x | src/YalpClients/EflClient/list.py | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/YalpClients/EflClient/list.py b/src/YalpClients/EflClient/list.py new file mode 100755 index 0000000..2f9488a --- /dev/null +++ b/src/YalpClients/EflClient/list.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python + +import edje +import ecore.evas +import sys +import os +import ecore +import emotion +import elementary +import evas + +def huhu(): + 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, huhu); + +li.item_append("blubb", None, None, huhu); + +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(); + + + |
