elm_test: workarounds for canvas_textblock style

The horizontally scrollable single-line text input box does not currently visible.
This patch turns it into a vertically scrollable multiline input box, with an
arbitrary minsize.
Also, make the label unselectable.
This commit is contained in:
Xavi Artigas 2019-12-16 11:35:35 +01:00
parent dfc9a3eef3
commit 16efc25ceb
1 changed files with 5 additions and 0 deletions

View File

@ -34,12 +34,17 @@ test_canvas_textblock(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
efl_add(EFL_UI_TEXTBOX_CLASS, box,
efl_gfx_hint_weight_set(efl_added, 1, 0),
efl_text_interactive_selection_allowed_set(efl_added, EINA_FALSE),
efl_text_interactive_editable_set(efl_added, EINA_FALSE),
efl_text_set(efl_added, "Live style editor. Enter a style string below:"),
efl_pack(box, efl_added));
input = efl_add(EFL_UI_TEXTBOX_CLASS, box,
efl_gfx_hint_weight_set(efl_added, 1, 0),
efl_text_set(efl_added, "font=Sans font_size=24 color=white"),
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(0, 48)),
efl_text_multiline_set(efl_added, EINA_TRUE),
efl_text_wrap_set(efl_added, EFL_TEXT_FORMAT_WRAP_WORD),
efl_pack(box, efl_added));
efl_ui_textbox_scrollable_set(input, EINA_TRUE);