Computer Science Canada

Some questions about making a list

Author:  Ashi_Mashi2 [ Thu Mar 24, 2005 9:16 pm ]
Post subject:  Some questions about making a list

Hi eveyone,

I want to make a list, and i need to know how to "add" an item into the listbox and how to remove it. also, i want to know is it possible to directry read the list from a file? i mean, i guess i can do it by physically 'open' a file and put each one in the listbox (once I know how to add an item in the list!)...but, is there an easier way? cause i saw one option saying: 'data source'...

thanks agian,

Author:  Brightguy [ Thu Mar 24, 2005 11:11 pm ]
Post subject:  Re: Some questions about making a list

Adds an item to a list at position index. (If index is omitted the item is added to the end of the list.)
VisualBASIC:
List1.AddItem (item, index)

Removes the item at position index from a list:
VisualBASIC:
List1.RemoveItem (index)

I don't know of any automatic way to load a list from a file, but it wouldn't be very hard to write your own procedure.


: