Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
module:ddlightbarmenu.js [2018/03/25 12:42] – Added details, and formatting similar to the JavaScript Object Model documentation pages nightfoxmodule:ddlightbarmenu.js [2018/03/26 10:43] – Added more information to the Add() method description nightfox
Line 8: Line 8:
 **DDLightbarMenu methods** **DDLightbarMenu methods**
 ^ Name                          ^ Returns          ^ Usage                                        ^ Description^ ^ Name                          ^ Returns          ^ Usage                                        ^ Description^
-| Add                           | void    | DDLightbarMenu.Add(text, retval, hotkey)     | Adds an item to the menu with a given item text, return value, and hotkey for the item |+| Add                           | void    | DDLightbarMenu.Add(text, retval, hotkey)     | Adds an item to the menu with a given item text, return value, and hotkey for the item.  If the ampersandHotkeysInItems property is set to true before this method is called, then a & can be used in the item text just before the hotkey you want to enable for the item.  For example, "Item &1" would display the text "Item 1" with "1" being the hotkey for the item. |
 | Remove                        | void    | DDLightbarMenu.Remove(idx)                   | Removes an item from the menu by its index | | Remove                        | void    | DDLightbarMenu.Remove(idx)                   | Removes an item from the menu by its index |
 | RemoveAllItems                | void    | DDLightbarMenu.RemoveAllItems()              | Removes all items from the menu | | RemoveAllItems                | void    | DDLightbarMenu.RemoveAllItems()              | Removes all items from the menu |
Line 16: Line 16:
 | RemoveItemHotkeys             | void    | DDLightbarMenu.RemoveItemHotkeys(idx)        | Removes all hotkeys from a menu item | | RemoveItemHotkeys             | void    | DDLightbarMenu.RemoveItemHotkeys(idx)        | Removes all hotkeys from a menu item |
 | RemoveAllItemHotkeys          | void    | DDLightbarMenu.RemoveAllItemHotkeys()        | Removes all hotkeys from all menu items | | RemoveAllItemHotkeys          | void    | DDLightbarMenu.RemoveAllItemHotkeys()        | Removes all hotkeys from all menu items |
-| GetVal                        | various | DDLightbarMenu.GetVal(draw)                  | Waits for user input, then gets the value of the item selected by the user.  The 'draw' parameter is a boolean that specifies whether or not to draw the item first (defaults to true).  If the menu is in multi-select mode, this method will return an array of the chosen values; otherwise, this method will return the single value selected by the user. |+| GetVal                        | various | DDLightbarMenu.GetVal(draw)                  | Waits for user input, then gets the value of the item selected by the user.  The 'draw' parameter is a boolean that specifies whether or not to draw the menu first (defaults to true).  The return value type will be as follows:\\ If in multi-select mode, this method will return an array of the chosen values.\\  * If in single-select mode, this method will return the single value selected by the user.\\  * If the user exited the menu without choosing (i.e., with ESC), this method will return null. |
 | SetPos                        | void    | DDLightbarMenu.SetPos(x, y)                  | Sets the menu's position, by the upper-left corner X and Y coordinates | | SetPos                        | void    | DDLightbarMenu.SetPos(x, y)                  | Sets the menu's position, by the upper-left corner X and Y coordinates |
 | SetSize                       | void    | DDLightbarMenu.SetSize(size)                 | Sets the menu's size.  The 'size' parameter is an object with the properties 'width' and 'height', specifying the menu's width and height. | | SetSize                       | void    | DDLightbarMenu.SetSize(size)                 | Sets the menu's size.  The 'size' parameter is an object with the properties 'width' and 'height', specifying the menu's width and height. |