DisplayObject.PopupMenu Method
| Explanation | Display a pop-up menu. From Ver.5.0.0, it is possible to specify the menu by XML structure. | |
| Call format | var id = obj.PopupMenu( menu1 [, menu2 [, menu3 … ] ] ) or var id = obj.PopupMenu( menudef ) | |
| Return value | The ID number automatically assigned to the menu choices is returned. The first element of the menu is 1 for the ID . In the hierarchical menu, "value of upper element *100 + n " is the ID number of the submenu. If no menu is selected, 0 is returned. | |
| Arguments | String menu | Specify the menu choices as a character string. If "-" is specified, the separator will be displayed. A check mark is displayed by adding "*" to the first character . If "~" is added to the first character, it will be invalid and cannot be selected. If you specify an object that has child objects at the bottom, a hierarchical submenu is displayed. You can specify up to 4 levels of submenus. If you specify an array, the array elements are expanded as menu items. |
| XmlDocument menudef | Specifies the XmlDocumentobject in the menu definition. XmlDocument whose XmlDOMImplementation.Unicode cannot be specified. Added since Ver.5.0.0 Not supported in Mobile, AI | |
| Exception | None | |
| Example of use | Example 1) Specification by character string | |
| Example 2) XML specification | | |
| Related item | Append method XmlDocument class | |