可以通过lv_obj_set_scroll_dir()限制滚动的方向。例如: lv_obj_set_scroll_dir(obj, LV_DIR_RIGHT); 那么就只能向右滚动到底,不能向左折回。 还可以通过以下几个函数利用代码执行滚动: lv_obj_scroll_to(obj, x, y, anim_en);lv_obj_scroll_by(obj, x, y, anim_en);lv_obj_scroll_to_view(ch...
if(obj->spec_attr->scrollbar_mode == mode) return; obj->spec_attr->scrollbar_mode = mode; lv_obj_invalidate(obj); }void lv_obj_set_scroll_dir(lv_obj_t * obj, lv_dir_t dir) { lv_obj_allocate_spec_attr(obj);if(dir != obj->spec_attr->scroll_dir) {...
lv_style_set_border_width(&style_bullet, 0); lv_style_set_radius(&style_bullet, LV_RADIUS_CIRCLE); tv = lv_tabview_create(lv_scr_act(), LV_DIR_TOP, tab_h); lv_obj_set_style_text_font(lv_scr_act(), font_normal, 0); if(disp_size == DISP_LARGE) { lv_obj_t * tab_btns...
Embedded graphics library to create beautiful UIs for any MCU, MPU and display type. - lvgl/src/core/lv_obj_style.c at e40a82a1b75ba39f8774589144eb701793a47dea · lvgl/lvgl
voidlv_obj_set_style_text_align(lv_obj_t* obj,lv_text_align_tvalue,lv_style_selector_tselector); 将文本垂直对齐。第三个参数selector是设置样式用的,这里可以暂时不用理会。 以下动图展示了三种长模式:显示省略号、换行并居中对齐,以及循环滚动: ...
* - lv_obj_free_id: Does nothing, as there is no memory allocation for the ID. * When disabled these functions needs to be implemented by the user.*/ #define LV_USE_OBJ_ID_BUILTIN 1 /** Use obj property set/get API. */ #define LV_USE_OBJ_PROPERTY 0 /** Enable property...
* - lv_obj_free_id: Does nothing, as there is no memory allocation for the ID. * When disabled these functions needs to be implemented by the user.*/ #define LV_USE_OBJ_ID_BUILTIN 1 /** Use obj property set/get API. */ #define LV_USE_OBJ_PROPERTY 0 /** Enable property...
/*Use obj property set/get API*/ #define LV_USE_OBJ_PROPERTY 0 /* VG-Lite Simulator */ /*Requires: LV_USE_THORVG_INTERNAL or LV_USE_THORVG_EXTERNAL */ #define LV_USE_VG_LITE_THORVG 0 #if LV_USE_VG_LITE_THORVG /*Enable LVGL's blend mode support*/ #define LV_VG...
/* Use lvgl builtin method for obj ID */ #define LV_USE_OBJ_ID_BUILTIN 0 /*Use obj property set/get API*/ #define LV_USE_OBJ_PROPERTY 0 /* VG-Lite Simulator */ /*Requires: LV_USE_THORVG_INTERNAL or LV_USE_THORVG_EXTERNAL */ #define LV_USE_VG_LITE_THORVG 0 #...
2.1.1888 Part 4 Section 19.4.2.62, UIObj (UI Object Toggle) 2.1.1889 Part 4 Section 19.4.2.63, Val (Scroll bar position) 2.1.1890 Part 4 Section 19.4.2.64, ValidIds (Valid ID) 2.1.1891 Part 4 Section 19.4.2.68, WidthMin (Minimum Width) 2.1.1892 Part 4 Section 19.5...