Languages

Menu
Sites
Language
About input panel of entry widget.

Hello, all.

I added entry object on bg image.

If I press entry object, input panel is activaed and then, bg image is resized even if the area for input panel is enough.

Due to this resizing, the screen gets out of shape.

 

I don't want this action.

Then, what api can I add?

Please let me know.

 

 

~


grid = elm_grid_add(nf);
evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(grid, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_win_resize_object_add(nf, grid);
evas_object_show(grid);


imgBgTop = elm_bg_add(grid);


 char bufTop[PATH_MAX];
 app_get_resource("images/bg.png", bufTop, (int)PATH_MAX);
 elm_bg_file_set(imgBgTop, bufTop, NULL);
 evas_object_size_hint_weight_set(imgBgTop, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 evas_object_show(imgBgTop);
 elm_grid_pack(grid, imgBgTop, 0, 0, screen_width, screen_height);


Evas_Object *h_entry = elm_entry_add(c_height);


elm_entry_single_line_set(h_entry, EINA_TRUE);
elm_entry_scrollable_set(h_entry, EINA_TRUE);
elm_scroller_policy_set(h_entry, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_OFF);
elm_entry_cnp_mode_set(h_entry, ELM_CNP_MODE_PLAINTEXT);
 elm_entry_input_panel_layout_set(h_entry, ELM_INPUT_PANEL_LAYOUT_IP);


elm_entry_entry_set(h_entry, view_data->height);
evas_object_show(h_entry);

elm_grid_pack(grid,~h_entry, x1, y1, x2, y2);

 

 

Responses

2 Replies
colin Rao

seems you are used the conformant widget, try to remove the conformant widget and put your widgets to win directly.

but I don't recommend this way.

Carsten Haitzler

several things wrong in your code. you use a grid badly - the grid by default has a virtual res of 100x100 - so your coords have to be 0 to 99 for x and  y (width and height also must fit eg be bwteen 1 and 100).

secondly - why use a grid at all? this seems like a pretty bad choice of widget. a quick outline of what you want.

1. add win

2. add bg and add as resize obj of win

3. add conformant and add as resize obj of win

4. add box or table and add and set as content of conformant

5. add entry and pack in box/table (e,g, at top), or wheveer and add more content below

the conformant will move/resize contetn if keyboard appears, but onlky if it has to (keyboard overlays part of your window). conformant may then move content too if content has hit its minimum size. ytou may also want to put a scroller there into the conformant (between bax/tablea nd conformant) and then the content is scrollable.

 

does this make sense/help?