Description
I want to center a label horizontally dynamically according content without modifying original y position, using the simplest solution.
What MCU/Processor/Board and compiler are you using?
ESP Core S3 (M5Dial) / Arduino /platform IO / EEZ Studio
What LVGL version are you using?
9.2.2
What have you tried so far?
int y = lv_obj_get_y(label);
lv_obj_center(label);
lv_obj_set_y(label, y);