Important: unclear posts may not receive useful answers.
Before posting
Get familiar with Markdown to format and structure your post
Be sure to update lvgl from the latest version from the master branch.
Be sure you have checked the relevant part of the documentation.
If applicable use the Simulator to eliminate hardware related issues.
Delete this section if you read and applied the mentioned points.
Description
how to set the text of textarea center while textarea is set PASSWORD_MODE?
What MCU/Processor/Board and compiler are you using?
What LVGL version are you using?
What do you want to achieve?
What have you tried so far?
I had inited the textarea background style and add to the LV_PART_MAIN, but it seemed useless
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.
lv_obj_t* spinbox = lv_spinbox_create(screen);
lv_spinbox_set_range(spinbox, 1, 99);
lv_spinbox_set_digit_format(spinbox, 2, 0);
lv_spinbox_step_prev(spinbox);
lv_obj_set_width(spinbox, 40);
lv_obj_set_height(spinbox, 35);
lv_obj_align(spinbox, LV_ALIGN_TOP_LEFT, 170, 185);
lv_spinbox_set_rollover(spinbox, true);
//lv_obj_set_style_border_opa(spinbox, LV_PART_CURSOR, LV_STATE_DEFAULT); // does not hide the cursor
//lv_obj_set_style_opa(spinbox, LV_PART_CURSOR, LV_STATE_DEFAULT); //hides complete textbox
lv_obj_set_style_pad_all(spinbox, 0, 0); // need to do that otherwise the value is jumping up and down
lv_obj_set_style_text_align(spinbox, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN); // Text is aligned at top of textbox with this
lv_spinbox_set_cursor_pos(spinbox, 0);
lv_coord_t h = lv_obj_get_height(spinbox);