What is the maximum scrollable range of an object?

home->page = lv_obj_create(home->parent);
lv_obj_set_scrollbar_mode(home->page, LV_SCROLLBAR_MODE_OFF);
lv_obj_set_style_border_width(home->page, 0, 0);
lv_obj_set_size(home->page, LV_HOR_RES_MAX, LV_VER_RES_MAX);
lv_obj_set_pos(home->page, 0, 0);
lv_obj_set_style_radius(home->page, 0, 0);
lv_obj_set_style_bg_opa(home->page, LV_OPA_TRANSP, 0);
lv_obj_add_flag(home->page, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_clear_flag(home->page, LV_OBJ_FLAG_SCROLL_ELASTIC);

I want to know the maximum range that home->page can scroll, is there a default value?


It’s limited only by the min/max coordinate values. Normally it’s around ±8k, but with LV_USE_LARGE_COORD it’s in the range of millions.

Yes, I have turned on LV_USE_LARGE_COORD and that solved my problem.
However, the range of int16_t is -32k ~ 32k,
Why is more than 8k out of range?


I already know the answer

1 Like