aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elementary
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-08-09 12:22:11 +0200
committerDave Andreoli <dave@gurumeditation.it>2016-08-09 12:22:11 +0200
commit9381d46765bc039e594eb5e02964f8797aea3e91 (patch)
treea6d529a216c7818cab0e8a6f073c4b98b687e92d /examples/elementary
parentNew 1.18 API: elm.Entry.select_region (get + property) (diff)
downloadpython-efl-9381d46765bc039e594eb5e02964f8797aea3e91.tar.gz
New 1.18 API: elm.GengridItem.all_contents_unset()
with test
Diffstat (limited to 'examples/elementary')
-rw-r--r--examples/elementary/test_gengrid.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/elementary/test_gengrid.py b/examples/elementary/test_gengrid.py
index 12eada2..0d879d8 100644
--- a/examples/elementary/test_gengrid.py
+++ b/examples/elementary/test_gengrid.py
@@ -308,6 +308,24 @@ def gengrid_clicked(obj):
tb.pack(bt, 4, 4, 1, 1)
bt.show()
+ # item content unset
+ def content_unset_clicked(bt, gg):
+ item = gg.selected_item
+ if item is None:
+ print("You must select an item first!")
+ else:
+ contents = item.all_contents_unset()
+ for obj in contents:
+ obj.pos = (0, 0)
+ obj.show()
+ # Now all the unsetted objects are orphan in the canvas,
+ # the user should do something with them
+
+ bt = Button(win, size_hint_align=FILL_HORIZ, text="Item content unset")
+ bt.callback_clicked_add(content_unset_clicked, gg)
+ tb.pack(bt, 5, 4, 1, 1)
+ bt.show()
+
# scroll_to methods
rdg = rd = Radio(win, text='SCROLL_IN',
state_value=elm.ELM_GENGRID_ITEM_SCROLLTO_IN)