To teach myself how to use LVGL in micropython I’ve been porting over portions of the lv_widgets demo from C to Python. I’ve encountered small problem, though. When I add a page to a tabview, I get a generic lvgl obj as the type, not a lvgl.page object. In the C example code, there are calls such as this one (where tab_page is a lv_obj_t type) and it works fine:
lv_page_set_scrl_layout(tab_page, LV_LAYOUT_PRETTY_TOP);
In python this does not work. I tried:
lvgl.page.set_scrl_layout(tab_page, lvgl.LAYOUT.PRETTY_TOP)
and I get the exception TypeError: argument should be a ‘page’ not a 'obj
Yet this is exactly what is done in the C code. What am I missing here?