aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elementary
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-01-14 21:49:06 +0100
committerDave Andreoli <dave@gurumeditation.it>2015-01-14 21:49:06 +0100
commitc1aeafd2e1da636699322452b9982af597a5cfa5 (patch)
treef1d209bdaad5d1a816ccc7a1136e1ef82fc169f8 /examples/elementary
parentGenlistItem: no more need to implement tooltip/cursor functions (diff)
downloadpython-efl-c1aeafd2e1da636699322452b9982af597a5cfa5.tar.gz
GengridItem: no more need to implement tooltip/cursor functions
They are yet implemented in ObjectItem, that is the base class for GengridItem
Diffstat (limited to 'examples/elementary')
-rw-r--r--examples/elementary/test_gengrid.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/elementary/test_gengrid.py b/examples/elementary/test_gengrid.py
index 8986499..c11bbec 100644
--- a/examples/elementary/test_gengrid.py
+++ b/examples/elementary/test_gengrid.py
@@ -90,9 +90,17 @@ def gengrid_clicked(obj):
gg.callback_clicked_double_add(gg_clicked_double)
gg.show()
+ def tooltip_content_cb(gl, item, obj):
+ txt = "Tooltip <b>from callback</b> for item # %d" % item.data
+ return Label(gl, text=txt)
+
# add the first items
for i in range(item_count):
- gg.item_append(itc, i, None)
+ ggi = gg.item_append(itc, i, None)
+ if i % 2:
+ ggi.tooltip_text_set("Static Tooltip for item # %d" % i)
+ else:
+ ggi.tooltip_content_cb_set(tooltip_content_cb)
# multi select
def multi_select_changed(bt, gg):