Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| scripting:dialogs:multi_listbox [2015/01/20 00:17] – [Multi Selection List Box] admin | scripting:dialogs:multi_listbox [2018/01/10 20:41] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 15: | Line 15: | ||
| ===== Items ===== | ===== Items ===== | ||
| - | List Box is filled by // | + | List Box is filled by // |
| ==== Item ==== | ==== Item ==== | ||
| Line 35: | Line 35: | ||
| varStorage.dynamic_list = js2ax(new Array(0, | varStorage.dynamic_list = js2ax(new Array(0, | ||
| - | // passing | + | // passing |
| // in this case using of Storage object is not needed | // in this case using of Storage object is not needed | ||
| var global_dynamic_list = js2ax(new Array(1, | var global_dynamic_list = js2ax(new Array(1, | ||
| Line 42: | Line 42: | ||
| ' | ' | ||
| < | < | ||
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| </ | </ | ||
| < | < | ||
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| </ | </ | ||
| < | < | ||
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| - | <item text=" | + | <item text=" |
| </ | </ | ||
| - | <group uniform=" | + | <group uniform=" |
| - | <button title="& | + | <button title="& |
| - | <button title="& | + | <button title="& |
| - | | + | </ |
| </ | </ | ||
| Line 92: | Line 92: | ||
| </ | </ | ||
| + | ===== Dynamic content ===== | ||
| + | Creating content dynamically is not straightforward, | ||
| + | <file javascript multi-list-box-dynamic-content.hejs> | ||
| + | #include " | ||
| + | |||
| + | var varStorage = new Storage(); | ||
| + | |||
| + | var dialog_template = | ||
| + | '< | ||
| + | < | ||
| + | |||
| + | for(var nItem = 0; nItem < 100; ++nItem) | ||
| + | dialog_template += ' | ||
| + | |||
| + | dialog_template += ' | ||
| + | \r\n <group uniform=" | ||
| + | \r\n <button title="& | ||
| + | \r\n < | ||
| + | \r\n </ | ||
| + | \r\n</ | ||
| + | |||
| + | Output().Clear(); | ||
| + | |||
| + | // show dialog using dialog template and variables storage for passing initial data | ||
| + | Output().writeln(" | ||
| + | |||
| + | // evaluate here returnCode (returnval of selected button) and decide if varStorage shall be evaluated | ||
| + | Output().writeln(" | ||
| + | Output().writeln(dialog_template); | ||
| + | |||
| + | // convert VB array to JS array and output it | ||
| + | Output().writeln(" | ||
| + | </ | ||