Closed xulei3388 closed 3 months ago
Hello!
Every lv_
function can be divided into 2 main groups in MicroPython code:
lv.button()
= create new button, lv.obj.FLAG.HIDDEN
= object hidden flaglv.label
object's text, btn.set_state()
= set a button object's stateBasically wherever you see lv_xxx_yyyy()
widget functions in LVGL documentation, you can "translate" those to: xxx.yyyy()
.
In your case:
there is no "set_state" function, but add_state
and remove_state
on the object:
lv_obj_add_state(btn1, LV_STATE_DISABLED)
btn1.add_state(lv.STATE.DISABLED)
Best regards, thank you very much!
Your selfless answer!
Ask a question about buttons
Manually set the current status of the button
How to use the lv_btn_set_state instruction in the mpy+lvgl system?