Hi,
I use Gui Guider 1.6.0 on Ubuntu. I have a button. I want to have unclickable screen after clicking this button. I know that below code helps me for one object. But I have a lot of object on one screen and I have more than 10 different screens.
lv_obj_clear_flag(guider_ui.obj1, LV_OBJ_FLAG_CLICKABLE);
Is there any short(cut/code) to do this with one line code ?
Such as
lv_obj_clear_flag(ALL OBJECTS ON THE PAGE, LV_OBJ_FLAG_CLICKABLE);
I have tried this,
I added lock button to the page, I added container and added all other objects into this container. I added event clear flag for this container but it didn't work as I expected. I might click other objects.
Solved! Go to Solution.
Hello @frozen ,
As the comment from Alex, the GUI Guider has no one line way to reach your goal, but there's a workaround may help you:
if (lv_obj_has_state(guider_ui.pageStatic_btn_1, LV_STATE_CHECKED)) {
lv_obj_add_flag(guider_ui.pageStatic_label_1, LV_OBJ_FLAG_CLICKABLE);
} else {
lv_obj_clear_flag(guider_ui.pageStatic_label_1, LV_OBJ_FLAG_CLICKABLE);
}
Best Regards,
Wenbin
Hello @frozen ,
As the comment from Alex, the GUI Guider has no one line way to reach your goal, but there's a workaround may help you:
if (lv_obj_has_state(guider_ui.pageStatic_btn_1, LV_STATE_CHECKED)) {
lv_obj_add_flag(guider_ui.pageStatic_label_1, LV_OBJ_FLAG_CLICKABLE);
} else {
lv_obj_clear_flag(guider_ui.pageStatic_label_1, LV_OBJ_FLAG_CLICKABLE);
}
Best Regards,
Wenbin
Hello, @frozen
Hi, in the GUI Guider each widget is a separate object. If you only add the event clear flag to the container, it will not work for buttons inside the container. If you want all widgets in the container to be unclickable, you need to add an event clear flag to each widget. Please refer to the attached video.
Currently, one-click setting is not supported to add a clear flag to all widgets. Hope this helps you.
Best regards, Alex.