Description
I use three external keys, as input device LV_INDEV_TYPE_ENCODER. I create a group for each screen, and add individual objects to the group. When the object has the state LV_STATE_DISABLED, after it is no longer visible on the screen (because another element is focused), that disputed object is no longer visible on the screen, it’s like it’s hidden when I try to focus it again. I forcibly clear the flag LV_OBJ_FLAG_HIDDEN of the object, but it doesn’t help. Please, help?
Additionally, I would like to change the behavior of the Checkbox object.
It is necessary to focus on the object with the keys, press the ENTER key, and then press the enter key again to change the state. Now it is necessary to hold the ENTER key to leave the object editing mode. Then we can use the PREV/NEXT keys to focus the objects in the group again.
I want the following behavior:
I use the PREV/NEXT keys to focus different objects in the group, and with the ENTER key I want to change the state CHECKED/UNCHECKED. I don’t want to enter editing mode with the ENTER key, nor do I want to hold the ENTER key to exit that mode
I want to increase the check mark, when the object is CHECKED.
What MCU/Processor/Board and compiler are you using?
ESP32-C3, ESP-IDF v5.0
What LVGL version are you using?
v8.3.9
Code to reproduce
void lv_example_checkbox_1(void)
{
lv_obj_set_flex_flow(lv_scr_act(), LV_FLEX_FLOW_COLUMN);
lv_obj_set_flex_align(lv_scr_act(), LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER);
lv_obj_t * cb;
cb = lv_checkbox_create(lv_scr_act());
lv_checkbox_set_text(cb, "Apple");
lv_obj_add_state(cb, LV_STATE_DISABLED);
lv_obj_add_event_cb(cb, event_handler, LV_EVENT_ALL, NULL);
cb = lv_checkbox_create(lv_scr_act());
lv_checkbox_set_text(cb, "Banana");
lv_obj_add_state(cb, LV_STATE_CHECKED);
lv_obj_add_event_cb(cb, event_handler, LV_EVENT_ALL, NULL);
cb = lv_checkbox_create(lv_scr_act());
lv_checkbox_set_text(cb, "Lemon");
lv_obj_add_event_cb(cb, event_handler, LV_EVENT_ALL, NULL);
cb = lv_checkbox_create(lv_scr_act());
lv_checkbox_set_text(cb, "Melon\nand a new line");
lv_obj_add_event_cb(cb, event_handler, LV_EVENT_ALL, NULL);
lv_obj_update_layout(cb);
}

