| 1234567891011121314151617181920212223 |
- local page_demo = {}
- function page_demo.demo()
- --Create a page
- local page = lvgl.page_create(lvgl.scr_act(), nil);
- lvgl.obj_set_size(page, 150, 200);
- lvgl.obj_align(page, nil, lvgl.ALIGN_CENTER, 0, 0);
- --Create a label on the page
- local label = lvgl.label_create(page, nil);
- lvgl.label_set_long_mode(label, lvgl.LABEL_LONG_BREAK); --Automatically break long lines
- lvgl.obj_set_width(label, lvgl.page_get_width_fit(page)); --Set the label width to max value to not show hor. scroll bars
- lvgl.label_set_text(label,
- [[Lorem ipsum dolor sit amet, consectetur adipiscing elit,sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
- Ut enim ad minim veniam, quis nostrud exercitation ullamco
- laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
- dolor in reprehenderit in voluptate velit esse cillum dolore
- eu fugiat nulla pariatur.
- Excepteur sint occaecat cupidatat non proident, sunt in culpa
- qui officia deserunt mollit anim id est laborum.]]);
- end
- return page_demo
|