The trick is to cast mbox1 to lv.cont before calling set_fit.
@kisvegabor, @embeddedt I think you should consider adding set_fit either to lv_obj or to all objects that might need it. Casting objects like this is not straightforward and as we discussed in the past all objects inherit directly from lv_obj (and not from lv_cont for example).
Thank you for clarifying.
I did the ladder and work fine.
It should be documented that this function only gives you one line of buttons and non scalable.