lvgl之属性设置

设置方式

lv_obj_add/clear_flag(obj, LV_OBJ_FLAG_HIDDEN );

//设置一个按钮不可按下  
    lv_obj_t * btn2 = lv_btn_create(lv_scr_act());
    lv_obj_align(btn2, LV_ALIGN_CENTER, 0, 40);

    lv_obj_clear_flag(btn2, LV_OBJ_FLAG_CLICKABLE);

• LV_OBJ_FLAG_HIDDEN Make the object hidden. (Like it wasn't there at all)
• LV_OBJ_FLAG_CLICKABLE Make the object clickable by input devices
• LV_OBJ_FLAG_CLICK_FOCUSABLE Add focused state to the object when clicked
• LV_OBJ_FLAG_CHECKABLE Toggle checked state when the object is clicked
• LV_OBJ_FLAG_SCROLLABLE Make the object scrollable
• LV_OBJ_FLAG_SCROLL_ELASTIC Allow scrolling inside but with slower speed
• LV_OBJ_FLAG_SCROLL_MOMENTUM Make the object scroll further when "thrown"
• LV_OBJ_FLAG_SCROLL_ONE Allow scrolling only one snappable children
• LV_OBJ_FLAG_SCROLL_CHAIN Allow propagating the scroll to a parent
• LV_OBJ_FLAG_SCROLL_ON_FOCUS Automatically scroll object to make it visible when focused
• LV_OBJ_FLAG_SNAPPABLE If scroll snap is enabled on the parent it can snap to this object
• LV_OBJ_FLAG_PRESS_LOCK Keep the object pressed even if the press slid from the object
• LV_OBJ_FLAG_EVENT_BUBBLE Propagate the events to the parent too
• LV_OBJ_FLAG_GESTURE_BUBBLE Propagate the gestures to the parent
• LV_OBJ_FLAG_ADV_HITTEST Allow performing more accurate hit (click) test. E.g. accounting for rounded
corners
• LV_OBJ_FLAG_IGNORE_LAYOUT Make the object positionable by the layouts
• LV_OBJ_FLAG_FLOATING Do not scroll the object when the parent scrolls and ignore layout
• LV_OBJ_FLAG_LAYOUT_1 Custom flag, free to use by layouts
• LV_OBJ_FLAG_LAYOUT_2 Custom flag, free to use by layouts
• LV_OBJ_FLAG_WIDGET_1 Custom flag, free to use by widget
• LV_OBJ_FLAG_WIDGET_2 Custom flag, free to use by widget
• LV_OBJ_FLAG_USER_1 Custom flag, free to use by user
• LV_OBJ_FLAG_USER_2 Custom flag, free to use by user
• LV_OBJ_FLAG_USER_3 Custom flag, free to use by user
• LV_OBJ_FLAG_USER_4 Custom flag, free to use by user

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值