I used the above method to create a menu. I don’t know whether it is correct. I haven’t seen a good example in the source code to implement it
Oh my, I have so many questions…
What does your menu look like?
Does it look/behave like you would expect/want?
Have you read the docs? Specifically:
https://docs.lvgl.io/master/widgets/menu.html