Description
I need to make my text in my TextArea become biggger
What MCU/Processor/Board and compiler are you using?
I use visual studio 2019 to simulate my application
What LVGL version are you using?
v 7.10
What do you want to achieve?
I need to make my text in my TextArea become biggger
What have you tried so far?
I have used style to do this but even I set the max font lv_font_montserrat_48 I see it still small
Code to reproduce
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
lv_style_init(&UISystemStyle.SignalSpeedStyle);
lv_style_set_radius(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, 5);
lv_style_set_bg_opa(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, LV_OPA_COVER);
lv_style_set_bg_color(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, LV_COLOR_WHITE);
//lv_style_set_border_width(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, 0);
lv_style_set_pad_top(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, 5);
lv_style_set_pad_bottom(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, 5);
lv_style_set_pad_left(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, 5);
lv_style_set_pad_right(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, 5);
lv_style_set_text_color(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, LV_COLOR_BLACK);
lv_style_set_text_font(&UISystemStyle.SignalSpeedStyle, LV_STATE_DEFAULT, &lv_font_montserrat_40);
/*****************************************************************************************************************/
ta = lv_textarea_create(cont, NULL);
lv_textarea_set_accepted_chars(ta, SINGAL_SPEED_ACCEPTED_CHARS);
lv_textarea_set_one_line(ta, true);
lv_obj_set_width(ta, SIGNAL_SPEED_WIDTH_SIZE);
lv_textarea_set_cursor_hidden(ta, true);
lv_textarea_set_text(ta, display_text);
lv_obj_align(ta, NULL, LV_ALIGN_CENTER, SIGNAL_SPEED_OFFSET_X, SIGNAL_SPEED_OFFSET_Y);
lv_obj_set_event_cb(ta, ta_event_cb);
lv_obj_set_size(ta, 200, 300);
lv_obj_add_style(ta, LV_TEXTAREA_PART_BG, &UISystemStyle.SignalSpeedStyle);
I’m looking forward to seeing your reply as soon as possible.
Thanks,
Best regards,