elm: change elm_object_content_part_set/get/unset to elm_object_part_content_set...
[framework/uifw/elementary.git] / doc / widgets / widget_preview_progressbar.c
1 #include "widget_preview_tmpl_head.c"
2
3 Evas_Object *ic, *pb, *bx;
4
5 bx = elm_box_add(win);
6 evas_object_show(bx);
7 elm_win_resize_object_add(win, bx);
8
9 ic = elm_icon_add(win);
10 elm_icon_standard_set(ic, "file");
11 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
12 evas_object_show(ic);
13
14 /* pb with label, icon, custom unit label and span size set */
15 pb = elm_progressbar_add(win);
16 elm_object_text_set(pb, "Label");
17 elm_progressbar_span_size_set(pb, 100);
18 elm_object_part_content_set(pb, "icon", ic);
19 elm_progressbar_unit_format_set(pb, "%1.1f units");
20 evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, EVAS_HINT_FILL);
21 evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
22 evas_object_show(pb);
23 elm_progressbar_value_set(pb, 0.5);
24 elm_box_pack_end(bx, pb);
25
26 #include "widget_preview_tmpl_foot.c"