Page 1 of 1

Adding items to Listbox

Posted: Tue Jan 29, 2008 1:12 pm
by Wreidek
Sorry if Im being slow but I can find no way to add items into a listbox. Can anyone help me with this?

Thanks

Adding items to Listbox

Posted: Wed Jan 30, 2008 12:56 pm
by PaPi
This is a sample code:

` listbox sample By PaPi
object myform as form
     center=true
     myform.AutoSize=true
     object LB_one as listbox
           width=200:height=200
           item(0)="Please click on this item!"
           item(1)="text 1"
           onclick=add_item
     end object
end object
myform.ShowModal
sub add_item()
     dim i as integer
     i=LB_one.ItemCount
     LB_one.item(i)="text "+str$(i)
end sub

Adding items to Listbox

Posted: Wed Jan 30, 2008 3:29 pm
by Wreidek
Thanks for the help Papi