Hello, guys. I'm having a trouble with adding some genlists to toolbar. As I understood due to Samples, a genlist can be added with a callback function, when you click on an item in a toolbar. but when I do this, I do not see it (and my eyes are not so bad :)
I'm trying to do the following:
elm_toolbar_item_append(toolbar, NULL, "ItemLabel", callbackFunc, this);
and the body of the callbackFunc is here:
void callbackFunc(void *data, Evas_Object *obj, void *event_info) { char edj_path[PATH_MAX] = {0, }; Evas_Object *layout = elm_layout_add(obj); elm_layout_file_set(layout, edj_path, "groupnamehere"); Evas_Object *list = elm_genlist_add(layout); Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new(); itc->item_style = "default_style"; for (int i = 0; i < 10; i++) { elm_genlist_item_append(list, itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); } elm_object_part_content_set(layout, "list", list); evas_object_show(list); evas_object_show(layout); }
here you can see the part name list, which I've got in the edc with type SWALLOW in order to put my layout+genlist there:
part { name: "list"; type: SWALLOW; description { state: "default" 0.0; rel1 { relative: 0.0 0.0; to: "toolbar"; } rel2 { relative: 1.0 1.0; } color: 255 0 0 255; } }
Seems legit. But there's nothing at all, not even an empty genlist.