forked from enlightenment/efl
test/entry: add editable set
Summary: There is no good entry test for changing editable mode. This patch adds a test for changing editable in entry. Reviewers: Hermet, tasn, herdsman Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D3112
This commit is contained in:
parent
3f40e53fbf
commit
0eb936a728
|
@ -75,6 +75,13 @@ my_entry_bt_6(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UN
|
|||
elm_entry_line_wrap_set(en, wr);
|
||||
}
|
||||
|
||||
static void
|
||||
my_entry_bt_7(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Evas_Object *en = data;
|
||||
elm_entry_editable_set(en, !elm_entry_editable_get(en));
|
||||
}
|
||||
|
||||
void
|
||||
test_entry(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
|
@ -194,6 +201,16 @@ test_entry(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
|
|||
elm_object_focus_allow_set(bt, EINA_FALSE);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Edit");
|
||||
evas_object_smart_callback_add(bt, "clicked", my_entry_bt_7, en);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
|
||||
elm_box_pack_end(bx2, bt);
|
||||
evas_object_propagate_events_set(bt, EINA_FALSE);
|
||||
elm_object_focus_allow_set(bt, EINA_FALSE);
|
||||
evas_object_show(bt);
|
||||
|
||||
elm_box_pack_end(bx, bx2);
|
||||
evas_object_show(bx2);
|
||||
|
||||
|
|
Loading…
Reference in New Issue