How to change the height of the mbox

Auto fit should be disabled first becaue the height is set automatically: lv_cont_set_fit(mbox, false, false).

The message box has a LV_LAYOUT_COL_M layout too which automatically aligns the text and buttons in a column. So setting the height will result in an extra space at the bottom.

Instead, I suggest adjusting the padding of the background style.

1 Like