Adjust message box button height


I created a message box with two buttons (YES/NO) within it. But I don’t know how to adjust the button height.

What MCU/Processor/Board and compiler are you using?

RT1062, IAR

What LVGL version are you using?


What do you want to achieve?

Adjust button height

What have you tried so far?

I’ve used “lv_msgbox_get_btnmatrix” to get out the button matrix object and tried to change its size, but it can’t work

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:

/*You code here*/

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

After any change on button text you need call:
[lv_btnmatrix_set_align(roller, LV_LABEL_ALIGN_LEFT/CENTER/RIGHT)]