Solved

general

Posted on 2008-10-29
3
137 Views
Last Modified: 2010-04-23
can i get some info on each topic of the following
ListBox
Process as array: Items(index)
Items, SelectedIndex, SelectedItem properties
Items.Count, Add, Insert, RemoveAt, Remove

thank you.
0
Comment
Question by:elrayiss
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
David L. Hansen earned 250 total points
ID: 22837018
Try:
http://www.java2s.com/Tutorial/VB/0260__GUI/0260__ListBox.htm
and
http://www.devx.com/dotnet/Article/20719/0/page/2

Basically, think of the listbox as a collection "rows" or strings (these are the items). So, in your code if you want to add something to it you do something like this:

Dim ListBox1 As New ListBox
        ListBox1.Items.Add("Miami")
        ListBox1.Items.Add("Dallas")

Open in new window

0
 
LVL 15

Expert Comment

by:David L. Hansen
ID: 22837032
Normally, you wouldn't Dim a ListBox, you'd place it with your mouse.  But after that you can programatically add items as shown above.  Then, if you do the following you'll get a count returned telling your program how many "row" or items are in the ListBox.

myInteger = ListBox1.Items.Count

Open in new window

0
 
LVL 20

Expert Comment

by:Venabili
ID: 22839131
What about using Google? What exactly is not clear on these?
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question