aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elementary
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-08-09 18:52:55 +0200
committerDave Andreoli <dave@gurumeditation.it>2016-08-09 18:52:55 +0200
commite47f403a0bb668ce6a901ad1d3806a91e332df80 (patch)
treec41b3ed8d6d47714e6b7f501857cfd5a662e4629 /examples/elementary
parentNew 1.18 API: elm.Configuration.scroll_animation_disabled (diff)
downloadpython-efl-e47f403a0bb668ce6a901ad1d3806a91e332df80.tar.gz
New 1.18 API: elm.Slider.range_enabled/range
with test
Diffstat (limited to 'examples/elementary')
-rw-r--r--examples/elementary/test_slider.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/elementary/test_slider.py b/examples/elementary/test_slider.py
index a3d159a..eb0d9cb 100644
--- a/examples/elementary/test_slider.py
+++ b/examples/elementary/test_slider.py
@@ -36,6 +36,9 @@ def delay_change_cb(obj, data=None):
def change_cb(obj, data=None):
data.value = obj.value
+def range_change_cb(obj):
+ print("Range: %d %d" % obj.range)
+
def change_print_cb(obj, data=None):
print("change to %3.3f" % obj.value)
@@ -117,6 +120,15 @@ def slider_clicked(obj):
bx.pack_end(sl)
sl.show()
+ # range slider (2 indicators)
+ sl = Slider(bx, text="Range (2 indicators)", range_enabled=True,
+ min_max=(0, 100), range=(20, 80),
+ unit_format="%.0f units", indicator_format="%.0f",
+ size_hint_expand=EXPAND_HORIZ, size_hint_fill=FILL_HORIZ)
+ sl.callback_changed_add(range_change_cb)
+ bx.pack_end(sl)
+ sl.show()
+
# disabled horizontally inverted slider
ic = Icon(bx, file=os.path.join(img_path, "logo_small.png"),
size_hint_aspect=(EVAS_ASPECT_CONTROL_VERTICAL, 1, 1))