From df87186480c026526e6cea5056fdde69e2bd1b2f Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 18 May 2014 09:51:56 +1000 Subject: Implement text entry and text box widgets. --- src/libraries/winFang.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/libraries/winFang.c') diff --git a/src/libraries/winFang.c b/src/libraries/winFang.c index 0d1622d..b6ceee9 100644 --- a/src/libraries/winFang.c +++ b/src/libraries/winFang.c @@ -447,11 +447,25 @@ Widget *widgetAdd(winFang *win, char *type , char *title, int x, int y, int w, i eo_key_data_set("Widget", result, NULL) ); + if (strcmp(WT_ENTRY, type) == 0) + { + eo_do(result->obj, + elm_obj_entry_scrollable_set(EINA_TRUE), + elm_obj_entry_editable_set(EINA_TRUE) + ); + } + else if (strcmp(WT_TEXTBOX, type) == 0) + { + eo_do(result->obj, + elm_obj_entry_scrollable_set(EINA_TRUE), + elm_obj_entry_editable_set(EINA_FALSE) + ); + } + if (x < 0) elm_layout_box_append(win->win, WF_BOX, result->obj); else elm_grid_pack(win->grid, result->obj, x, y, w, h); - winFangCalcMinSize(win); if (title) { @@ -459,6 +473,7 @@ Widget *widgetAdd(winFang *win, char *type , char *title, int x, int y, int w, i elm_object_text_set(result->obj, result->label); evas_object_name_set(result->obj, title); } + winFangCalcMinSize(win); } return result; -- cgit v1.1