spilz87
February 26, 2024, 11:53am
1
What MCU/Processor/Board and compiler are you using?
ESP32C3 / arduino
What LVGL version are you using?
V8 last version (before V9)
What do you want to achieve?
To use properly the widget MENU
I feel I don’t open / close it properly (I’m using hidden flag)
I don’t find how to “reset” it
What have you tried so far?
I use a button to unhide the widget MENU
I try to clear and hidde it when I’m in a sub-menu, but it stays in sub menu
Thanks in advance for your help
Regards
Nobody know how to show / close a menu widget ?
Hidden it is it the good way to do it ?
I also use lv_obj_clear_flag(mymenu, LV_OBJ_FLAG_HIDDEN);
to show menu. To hide menu I use lv_obj_add_flag(menu, LV_OBJ_FLAG_HIDDEN);
inside back_event_handler()
where I check lv_menu_back_btn_is_root(menu, obj)
. And this is works for me.
@glory-man thanks for you reply
I do the same, so it seems it make sens !
How do you do when you hide the menu and you are in sub-menu ?
Like “resetting” the widget to go back to the main menu.
Thanks for your help
In my app I can leave menu only on the top level - when back button pressed. So I can’t leave menu in sub-menu.