A pop-up menu for WsGUI.
Create new instance and add it to the window immediately.
Create new instance without adding it to the window. Use this when using WsLayout.
wsWindow |
An instance of |
bounds |
A NOTE: Currently a relative measurement is used: 1 for full window width, 1 for full window height, e.g.
Rect(0, 0, 1, 1) would occupy whole window.NOTE: Because of a bug or peculiarity of certain browsers - the size of the menu (and font to some extent) will not have proper height unless you specify background color |
an instance of the widget
Get current menu's item text (String
).
String
is not currently implementedGet/set all items of the menu.
itemArr |
Array of strings, setting contents of the menu. |
current items
Gets or sets function to be evaluated when the the item is chosen.
function |
Any object to set as default action, usually a Function. It is passed the current instance. |
Sets the current item. Does not trigger the action.
val |
An integer setting the current menu item. |
Sets the current item.
val |
An integer setting the current menu item. |
color |
Background color of the widget. Should be an instance of a |
current color
color |
Text color of the widget. Should be an instance of a |
current color