Listbox issue

i have a problem with listbox let's say i have 2 items in listbox #("Box1","Box2"). Now I want to update the first item in listbox using Listbox.Items[1]="Box3"
the code looks nothing wrong. but the listbox does't show the first one item as a "Box3", did a missing someting with that code.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

...

Try this.

try(destroyDialog ::bgaRoll)catch()
rollout bgaRoll "• • •"
(
 
	listbox lb "" pos:[5,5] width:50 height:5 items:#("Box001", "Box002")
	button btn "Add Item" pos:[5,75] width:50
	on btn pressed do
	(
		lb.items = (lb.items[1] = "Box003" ; lb.items)
	)
)
createDialog bgaRoll 60 100 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)

bga

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.