Elementary entry widget
This code snippet demonstrates how to create an entry widget and perform some basic operations on it.
Evas_Object* entry = elm_entry_add(ad->win);
evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
//single line
elm_entry_single_line_set(entry, EINA_TRUE);
//set entry text
elm_entry_entry_set(entry, "text");
//insert text at current cursor position (here beginning)
elm_entry_entry_insert(entry, "sample ");
//set entry to password mode
elm_entry_password_set(entry, EINA_TRUE);
//disable entry editing
elm_entry_editable_set(entry, EINA_FALSE);
evas_object_show(entry);
elm_object_content_set(ad->conform, entry);
//get entry text
const char* text = elm_entry_entry_get(entry);
dlog_print(DLOG_DEBUG, LOG_TAG, "Entry text: %s", text);