Elementary panel widget
This code snippet demonstrates how to use the elementary panel widget. Sample code creates two panels, top and bottom, and sets their contents.
// create box object for our two panels
Evas_Object *box = elm_box_add(ad->win);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(ad->win, box);
evas_object_show(box);
// create the top panel
Evas_Object *panel_top = elm_panel_add(ad->win);
elm_panel_orient_set(panel_top, ELM_PANEL_ORIENT_TOP);
elm_panel_toggle(panel_top);
evas_object_size_hint_weight_set(panel_top, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(panel_top, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(panel_top);
elm_box_pack_end(box, panel_top);
Evas_Object *content_top = elm_label_add(ad->win);
elm_object_text_set(content_top, "Panel top content");
evas_object_show(content_top);
elm_object_content_set(panel_top, content_top);
// create the bottom panel
Evas_Object *panel_bottom = elm_panel_add(ad->win);
elm_panel_orient_set(panel_bottom, ELM_PANEL_ORIENT_BOTTOM);
evas_object_size_hint_weight_set(panel_bottom, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(panel_bottom, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(panel_bottom);
elm_box_pack_end(box, panel_bottom);
Evas_Object *content_bottom = elm_label_add(ad->win);
elm_object_text_set(content_bottom, "Panel bottom content");
evas_object_show(content_bottom);
elm_object_content_set(panel_bottom, content_bottom);