printf("radio value : %d\n", elm_radio_value_get(obj));
}
+static void
+_rdg_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
+ void *event_info EINA_UNUSED)
+{
+ printf("radio group value : %d\n", elm_radio_value_get(obj));
+}
+
void
test_radio(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
elm_box_pack_end(bx, rd);
evas_object_show(rd);
evas_object_smart_callback_add(rd, "changed", _rd_changed_cb, NULL);
+
+ // rdg radio group
rdg = rd;
+ evas_object_smart_callback_add(rdg, "changed", _rdg_changed_cb, NULL);
ic = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
rd = elm_radio_add(win);
elm_radio_state_value_set(rd, 2);
- elm_radio_group_add(rd, rdg);
+ elm_radio_group_add(rd, rdg); // add a radio button rd to a radio group rdg.
elm_object_text_set(rd, "Label Only");
elm_box_pack_end(bx, rd);
evas_object_show(rd);
rd = elm_radio_add(win);
elm_radio_state_value_set(rd, 3);
- elm_radio_group_add(rd, rdg);
+ elm_radio_group_add(rd, rdg); // add a radio button rd to a radio group rdg.
elm_object_text_set(rd, "Disabled");
elm_object_disabled_set(rd, EINA_TRUE);
elm_box_pack_end(bx, rd);
rd = elm_radio_add(win);
elm_radio_state_value_set(rd, 4);
- elm_radio_group_add(rd, rdg);
+ elm_radio_group_add(rd, rdg); // add a radio button rd to a radio group rdg.
elm_object_part_content_set(rd, "icon", ic);
elm_box_pack_end(bx, rd);
evas_object_show(rd);
rd = elm_radio_add(win);
elm_radio_state_value_set(rd, 5);
- elm_radio_group_add(rd, rdg);
+ elm_radio_group_add(rd, rdg); // add a radio button rd to a radio group rdg.
elm_object_part_content_set(rd, "icon", ic);
elm_object_disabled_set(rd, EINA_TRUE);
elm_box_pack_end(bx, rd);