aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elementary
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-01-14 21:37:17 +0100
committerDave Andreoli <dave@gurumeditation.it>2015-01-14 21:37:17 +0100
commitbe323e24bcdce07e1cfe64efd7fbac15c5fa164d (patch)
treefe9ccfffae17b59712b69bc3e4c45ad26cdc9d2f /examples/elementary
parentDoc: restructure elementary documentation (diff)
downloadpython-efl-be323e24bcdce07e1cfe64efd7fbac15c5fa164d.tar.gz
GenlistItem: no more need to implement tooltip/cursor functions
They are yet implemented in ObjectItem, that is the base class for GenlistItem
Diffstat (limited to 'examples/elementary')
-rw-r--r--examples/elementary/test_genlist.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/elementary/test_genlist.py b/examples/elementary/test_genlist.py
index 0b96e53..57756a3 100644
--- a/examples/elementary/test_genlist.py
+++ b/examples/elementary/test_genlist.py
@@ -147,8 +147,18 @@ def genlist_clicked(obj, item=None):
vbx.pack_end(bt_1500)
bt_1500.show()
+ def tooltip_content_cb(gl, item, obj):
+ txt = "Tooltip <b>from callback</b> for item # %d" % item.data
+ return Label(gl, text=txt)
+
for i in range(0, 2000):
gli = gl.item_append(itc1, i, func=gl_item_sel)
+
+ if i % 2:
+ gli.tooltip_text_set("Static Tooltip for item # %d" % i)
+ else:
+ gli.tooltip_content_cb_set(tooltip_content_cb)
+
if i == 50:
bt_50._callback_add("clicked", lambda bt, it: it.bring_in(), gli)
elif i == 1500: