언어 설정

Menu
Sites
Language
How to create edittext

Hi,

I want to create table with edit text in tizen. Something like below.

     
     
     

From code point of view it will be something like this

    Evas_Object *o = elm_table_add(ad->win);
    evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(ad->win, o);
    evas_object_show(o);

    Evas_Object *o2 = /* CODE FOR EDIT TEXT */
    evas_object_size_hint_min_set(o2, 200, 200);
    evas_object_show(o2);
    elm_table_pack(o, o2, 0, 0, 1, 1);

Responses

7 댓글
Jean Yang

 Hi,

Please add below code in the table, then you can get the text edit:     

        Evas_Object *entry;
        entry = elm_entry_add(table);
        elm_entry_entry_set(entry, "A short text.");        
        evas_object_show(entry);
        elm_table_pack(table, entry, 0, 0, 1, 1);

Nikhil Kumar

Dear Yang,

Thank you for your prompt response.

Actually I want to create a table with n*n rows and column and by arranging edit text in table form it not happning properly.

I have asked the same in a seperate thread, please help if you have any idea.

Jean Yang

Hello Nikhil,

If you just  want to display the different valuse in the table cell, you can add the the label widget in ecah cell, and then if you want to refresh the data of label, just set the text value, if there are some problem in layout, you can change the text size, then the text in table cell will display correctly.

 Evas_Object *entry;
    entry = elm_entry_add(content_table);
    elm_entry_entry_set(entry, "test");
    evas_object_show(entry);
    elm_table_pack(content_table, entry, 0, 0, 1, 1);

    Evas_Object *label = elm_label_add(content_table);
    elm_object_text_set(label, "Hello EFL");
    evas_object_show(label);
    elm_table_pack(content_table, label, 1, 0, 1, 1);

 

Nikhil Kumar

Dear Yang,

Thanks for yor response.

I want the UI to be like the one shown below, where each cell is editable. Please help in this regard.

colin Rao

Seems you want to create an excel like app on Tizen, I thinks it's almostly impossible on Tizen via native programming. 

Suggest you to try the web programming on Tizen, try to investigate is it possible to use the SpreadJS(or another similiar framework) in Tizen web.

Jean Yang

Hi, 

From technique view, you and add the entry for each cell of table, then each cell is editable, but seems this is not good for practice, why  don't you update your text value in backgroud, and display it in your page.

Jean Yang

Hi, 

From technique view, you and add the entry for each cell of table, then each cell is editable, but seems this is not good for practice, why  don't you update your text value in backgroud, and display it in your page.