Hi to all!
I want to put some labels and input fields in a popup element, as a configuration window. I have this code:
void create_popup_setting(void *data){
appdata_s *ad = data;
ad->popup_setting = elm_layout_add(ad->conform);
elm_popup_align_set(ad->popup_setting, ELM_NOTIFY_ALIGN_FILL, 1.0);
evas_object_size_hint_weight_set(ad->popup_setting, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_object_text_set(ad->popup_setting, "Settings");
Evas_Object *conform = elm_conformant_add(ad->popup_setting);
Evas_Object *table = elm_table_add(ad->popup_setting);
//elm_table_padding_set(table, 100, 0);
elm_object_content_set(conform, table);
evas_object_show(table);
my_table_pack(table, NULL, 0, 0, 4, 10);
Evas_Object *button_save_popup;
button_save_popup = elm_button_add(conform);
elm_object_text_set(button_save_popup, "Save");
evas_object_smart_callback_add(button_save_popup, "clicked", setting_popup_save_cb, ad);
//elm_object_part_content_set(ad->popup_setting, "button1", button_save_popup);
evas_object_size_hint_weight_set(button_save_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button_save_popup, EVAS_HINT_FILL, 0.5);
elm_table_pack(table, button_save_popup,0,9,2,1);
evas_object_show(button_save_popup);
evas_object_show(ad->popup_setting);
}
I tryed also:
void create_popup_setting(void *data){
appdata_s *ad = data;
ad->popup_setting = elm_popup_add(ad->conform);
elm_popup_align_set(ad->popup_setting, ELM_NOTIFY_ALIGN_FILL, 1.0);
evas_object_size_hint_weight_set(ad->popup_setting, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_object_text_set(ad->popup_setting, "Settings");
Evas_Object *conform = elm_conformant_add(ad->popup_setting);
Evas_Object *table = elm_table_add(ad->popup_setting);
//elm_table_padding_set(table, 100, 0);
elm_object_content_set(conform, table);
evas_object_show(table);
my_table_pack(table, NULL, 0, 0, 4, 10);
Evas_Object *button_save_popup;
button_save_popup = elm_button_add(conform);
elm_object_text_set(button_save_popup, "Save");
evas_object_smart_callback_add(button_save_popup, "clicked", setting_popup_save_cb, ad);
//elm_object_part_content_set(ad->popup_setting, "button1", button_save_popup);
evas_object_size_hint_weight_set(button_save_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(button_save_popup, EVAS_HINT_FILL, 0.5);
elm_table_pack(table, button_save_popup,0,9,2,1);
evas_object_show(button_save_popup);
Evas_Object *button_cancel_popup;
button_cancel_popup = elm_button_add(conform);
elm_object_text_set(button_cancel_popup, "Cancel");
evas_object_smart_callback_add(button_cancel_popup, "clicked", setting_popup_exit_cb, ad);
elm_object_part_content_set(ad->popup_setting, "button2", button_cancel_popup);
}
But is not showing nothing.
Any suggestion?
Thanks to all!