Adding items to Listbox

In this category you can exchange your programming questions and solutions.
Post Reply
Wreidek
Posts: 3
Joined: Tue Nov 08, 2005 3:00 pm

Adding items to Listbox

Post: # 189Post Wreidek
Tue Jan 29, 2008 1:12 pm

Sorry if Im being slow but I can find no way to add items into a listbox. Can anyone help me with this?

Thanks

PaPi
Posts: 114
Joined: Wed May 16, 2007 11:55 am

Adding items to Listbox

Post: # 190Post PaPi
Wed Jan 30, 2008 12:56 pm

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

Wreidek
Posts: 3
Joined: Tue Nov 08, 2005 3:00 pm

Adding items to Listbox

Post: # 191Post Wreidek
Wed Jan 30, 2008 3:29 pm

Thanks for the help Papi

Post Reply