example of create a menu with subitems programatically

hi, i need a example for create a menu with items and subtiems programatically. with a event onclick .
regards
regards
Welcome to the Official CGDevTools Support Community Forums.
https://www.cgdevtools.com/cgforum/
https://www.cgdevtools.com/cgforum/viewtopic.php?f=44&t=3651