Hello everyone,
I use LVGL VERSION: 8.3.3.
Hello everyone,
I needed to load symbols in a roller, but do it previously in a variable that I later use in the roller. Is that possible? How would it be done?
instructions in *.ino
for ( JsonObject item : doc.as<JsonArray>() ) {
....
....
if ( f < 24 ) w_scro = w_scro + String(hora) + ":00 h. " + String(porc) + " % " ;
if ( esta == 0 ) w_scro = w_scro + "LV_SYMBOL_OK";
if ( esta == 2 ) w_scro = w_scro + "LV_SYMBOL_WARNING";
if ( f < 23 ) w_scro = w_scro + "\n";
....
....
}
instructions in *.c
Vista_Roller1 = lv_roller_create(Vista);
lv_obj_set_width(Vista_Roller1, 308);
lv_obj_set_height(Vista_Roller1, 181);
lv_obj_set_x(Vista_Roller1, 0);
lv_obj_set_y(Vista_Roller1, 20);
lv_obj_set_align(Vista_Roller1, LV_ALIGN_CENTER);
lv_obj_set_scrollbar_mode(Vista_Roller1, LV_SCROLLBAR_MODE_AUTO);
lv_obj_set_style_text_font(Vista_Roller1, &ui_font_Font18, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_roller_set_options(Vista_Roller1, w_scro, LV_ROLLER_MODE_INFINITE);
Thank you very much.