创建标签:lv_obj_t * label = lv_label_create(parent); 1.1 设置显示文本 创建了标签部件之后我们就可以设置文本来显示。 直接设置要显示的文本:lv_label_set_text(label, "New text"); 格式化给定要显示的文本:lv_label_set_text_fmt(label, “%s: %d”, “Value”, 15); ...
static void lv_textarea_event(const lv_obj_class_t * class_p, lv_event_t * e); static void cursor_blink_anim_cb(void * obj, int32_t show); static void pwd_char_hider_anim(void * obj, int32_t x); static void pwd_char_hider_anim_ready(lv_anim_t * a); ...
void lv_label_set_text_fmt(lv_obj_t * obj, const char * fmt, ...) { LV_ASSERT_OBJ(obj, MY_CLASS); LV_ASSERT_NULL(fmt); lv_obj_invalidate(obj); lv_label_t * label = (lv_label_t *)obj; /*If text is NULL then refresh*/ if(fmt == NULL) { lv_label_refr_text(obj);...
Embedded graphics library to create beautiful UIs for any MCU, MPU and display type. - lvgl/src/core/lv_obj_scroll.c at 4341660b93bda8eafbf836b2974285b39a68409c · lvgl/lvgl
static lv_obj_t * card_create(void);static void empty_screen_cb(void) { color_anim(lv_screen_active()); }static void moving_wallpaper_cb(void) { lv_obj_set_style_pad_all(lv_screen_active(), 0, 0); LV_IMG_DECLARE(img_benchmark_cogwheel_rgb);...
{// refresh display 2}voidmain(void){// Initialize LVGL and other hardwarelv_obj_t*screen1=lv_obj_create(NULL,NULL);lv_obj_t*screen2=lv_obj_create(NULL,NULL);disp1.screen=screen1;disp2.screen=screen2;lv_disp_trig_update(disp1.disp);lv_disp_trig_update(disp2.disp);while(1){//...
* - lv_obj_assign_id: Called when a widget is created. Use a separate counter for each widget class as an ID. * - lv_obj_id_compare: Compare the ID to decide if it matches with a requested value. * - lv_obj_stringify_id: Return e.g. "button3" * - lv_obj_free_id: Does...
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...
class BenZ: pass class BMW: pass class BYD: pass class CarFactory: """定义两个类属性""" __obj = None __init_flag = True """定义工厂方法: 输入对应的商标, 返回对应的对象""" def create_car(self, brand): if brand == "奔驰": return BenZ() elif brand == "宝马": return BMW()...
2.1.1169 Part 4 Section 4.4.2.4, oleObj (Global Element for Embedded objects and Controls) 2.1.1170 Part 4 Section 4.4.3.1, tag (Programmable Extensibility Tag) 2.1.1171 Part 4 Section 4.5.1, cm (Comment) 2.1.1172 Part 4 Section 4.5.5, pos (Comment Position) 2.1.1173 P...