lv_obj_set_flex_flow(ui_Panel1, LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_align(ui_Panel1, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER); lv_obj_clear_flag(ui_Panel1, LV_OBJ_FLAG_SCROLLABLE); /// Flags lv_obj_set_style_radius(ui_Panel1, 0, LV_PART_MAIN |...
lv_obj_t * panel = lv_obj_create(lv_screen_active()); lv_obj_set_size(panel, 280, 120); lv_obj_set_scroll_snap_x(panel, LV_SCROLL_SNAP_CENTER); lv_obj_set_flex_flow(panel, LV_FLEX_FLOW_ROW); lv_obj_align(panel, LV_ALIGN_CENTER, 0, 20); uint32_t i; for(i = 0; i...
lv_obj_t* cont =lv_obj_create(lv_scr_act());lv_obj_set_flex_flow(cont, LV_FLEX_FLOW_ROW_WRAP);lv_obj_set_size(cont,160,180);lv_obj_set_flex_align(cont, LV_FLEX_ALIGN_SPACE_BETWEEN, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START);lv_obj_set_style_base_dir(cont, LV_BASE_DIR_R...
lv_event_send(arc, LV_EVENT_VALUE_CHANGED,NULL); } staticvoidvalue_changed_event_cb(lv_event_t* e) { lv_obj_t* arc =lv_event_get_target(e);// 获取触发事件的部件(对象) lv_obj_t* label =lv_event_get_user_data(e);// 得到label标签对象 lv_label_set_text_fmt(label,"%d%%",lv...
static void event_cb(lv_event_t * e) { LV_LOG_USER("Clicked"); static uint32_t cnt = 1; lv_obj_t * btn = lv_event_get_target(e); lv_obj_t * label = lv_obj_get_child(btn, 0); lv_label_set_text_fmt(label, "%"LV_PRIu32, cnt); ...
lv_obj_scroll_to_view(lv_obj_get_child(cont, mid_btn_index), LV_ANIM_OFF);// lv_obj_get_child 通过子索引获取对象的子对象 } } /* 保证界面居中显示 */ lv_obj_set_style_translate_y(lv_obj_get_child(cont, mid_btn_index),0,0); ...
button(lv.screen_active()) button.center() button.set_size(100, 50) button.add_event_cb(button_event_cb, lv.EVENT.CLICKED, None) label = lv.label(button) label.set_text("Button") label.center() Checkboxes with Layout C code lv_obj_set_flex_flow(lv_screen_active(), LV_FLEX_FLOW...
static lv_obj_t * meter;static void set_value(void * indic, int32_t v){ lv_meter_set_...
lv_obj_set_flex_flow(lv_screen_active(), LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_align(lv_screen_active(), LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER);lv_obj_t* cb; cb = lv_checkbox_create(lv_screen_active()); lv_checkbox_set_text(cb,"Apple"); lv_obj_...
I encountered the related issue in 8.1.0 and 8.3.0 As in the title, when lv_obj_set_flex_flow(pg, LV_FLEX_FLOW_ROW) is active, with the lv_obj_scroll_to_view function, the page scrolls in one direction at first. When it comes to the firs...