Skip to content

Conversation

@kisvegabor
Copy link
Member

Description of the feature or fix

The Arabic character are not displayed in the example now:
https://docs.lvgl.io/master/widgets/keyboard.html#keyboard-with-text-area

Notes

@kisvegabor kisvegabor force-pushed the fix/keyboard-example branch from 20b92b1 to 13b9748 Compare January 24, 2024 09:32
@IAMMX
Copy link
Contributor

IAMMX commented Jan 24, 2024

void lv_example_textarea_2(void)
{
/*Create the password box*/
lv_obj_t * pwd_ta = lv_textarea_create(lv_screen_active());
lv_textarea_set_text(pwd_ta, "");
lv_textarea_set_password_mode(pwd_ta, true);
lv_textarea_set_one_line(pwd_ta, true);
lv_obj_set_width(pwd_ta, lv_pct(40));
lv_obj_set_pos(pwd_ta, 5, 20);
lv_obj_add_event_cb(pwd_ta, ta_event_cb, LV_EVENT_ALL, NULL);
/*Create a label and position it above the text box*/
lv_obj_t * pwd_label = lv_label_create(lv_screen_active());
lv_label_set_text(pwd_label, "Password:");
lv_obj_align_to(pwd_label, pwd_ta, LV_ALIGN_OUT_TOP_LEFT, 0, 0);
/*Create the one-line mode text area*/
lv_obj_t * text_ta = lv_textarea_create(lv_screen_active());
lv_textarea_set_one_line(text_ta, true);
lv_textarea_set_password_mode(text_ta, false);
lv_obj_set_width(text_ta, lv_pct(40));
lv_obj_add_event_cb(text_ta, ta_event_cb, LV_EVENT_ALL, NULL);
lv_obj_align(text_ta, LV_ALIGN_TOP_RIGHT, -5, 20);
/*Create a label and position it above the text box*/
lv_obj_t * oneline_label = lv_label_create(lv_screen_active());
lv_label_set_text(oneline_label, "Text:");
lv_obj_align_to(oneline_label, text_ta, LV_ALIGN_OUT_TOP_LEFT, 0, 0);
/*Create a keyboard*/
kb = lv_keyboard_create(lv_screen_active());
lv_obj_set_size(kb, LV_HOR_RES, LV_VER_RES / 2);
lv_keyboard_set_textarea(kb, pwd_ta); /*Focus it on one of the text areas to start*/
}

https://docs.lvgl.io/master/widgets/textarea.html#text-area-with-password-field
This example also needs fixing.

@kisvegabor
Copy link
Member Author

Thank you, updated.

@XuNeo XuNeo merged commit 5e161fe into lvgl:master Jan 25, 2024
@kisvegabor kisvegabor deleted the fix/keyboard-example branch January 26, 2024 08:18
HongChao6 pushed a commit to HongChao6/lvgl that referenced this pull request Oct 18, 2024
HongChao6 pushed a commit to HongChao6/lvgl that referenced this pull request Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants