Notifications
Clear all
[Closed] Listbox update
Mar 01, 2007 2:59 pm
Hi , i’m trying to make a script , where you can can input labels and then appear in a list box.
I try using append <listbox>.items txt
this works , because it does append txt to the array , but the problem is that the list box doesn’t show the items change.
I try with combo box but i got the same result.
3 Replies
Mar 01, 2007 2:59 pm
Try appending to a seperate Array first then setting the listBox.items property to that array. Like this:
(
local itemArray = #()
rollout listTest "List Box Test"
(
editText newItem across:2
button addItem "ADD"
listbox allItems "Items" items:itemArray
on addItem pressed do
(
if newItem.text != "" then
(
append itemArray newItem.text
allItems.items = itemArray
)
)
)
createDialog listTest
)