Start menus / Using start menus |
You can create a startmenu dynamically with the om.DomNode class:
DEFINE aui om.DomNode LET aui = ui.Interface.getRootNode()
DEFINE sm om.DomNode LET sm = aui.createChild("StartMenu")
DEFINE smg om.DomNode LET smg = sm.createChild("StartMenuGroup") CALL smg.setAttribute("text","Programs")
DEFINE smc, sms om.DomNode LET smc = smg.createChild("StartMenuCommand") CALL smc.setAttribute("text","Orders") CALL smc.setAttribute("exec","fglrun orders.42r") LET smc = smg.createChild("StartMenuCommand") CALL smc.setAttribute("text","Customers") CALL smc.setAttribute("exec","fglrun customers.42r") LET sms = smg.createChild("StartMenuSeparator") LET smc = smg.createChild("StartMenuCommand") CALL smc.setAttribute("text","Items") CALL smc.setAttribute("exec","fglrun items.42r")