An enhancement to the XTREE PopupMenu now supports sub-menus. The syntax is the same as for Hover/Context menus, i.e. set the cmd field (of the text,cmd; menu item pair) to "[SUB]" to mark the beginning of the submenu, and the text field of a subsequent item to "[ENDSUB]" to mark the end of the submenu. For example:
coldef$ += "0~0~ ~SH~PopupMenu=" &
+ "!Retire\tF2,VK_xF501;" &
+ "|arrow_right_green::ashico1|Peacetime,[SUB];" &
+ "|photo_portrait::ashico1|Visit\tF3,VK_xF502;" &
+ "|signpost::ashico1|Pass Through,VK_xF503;" &
+ "[ENDSUB],;" &
+ "-----,;" &
+ "|gear::ashico1|Wartime,[SUB];" &
+ "Attack,VK_xF504;Lay Siege,VK_x507;" &
+ "[ENDSUB],;" &
+ "-----,;" &
...
The codeabove defines a PopupMenu which looks something like this:
Retire F2 (disabled item)
Peacetime (submenu with icon)
Visit F3 (submenu item with icon)
Pass Through (submenu item with icon)
--------------------- (separator)
Wartime (submenu with icon)
Attack (submenu item)
Lay Siege (submenu item)
--------------------- (separator)
...