This Forum has been archived there is no more new posts or threads ... use this link to report any abusive content
==> Report abusive content in this page <==
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I create a listbox with scroll bar in Visual Basic?
01-08-2013, 12:45 AM
Post: #1
How do I create a listbox with scroll bar in Visual Basic?
I will make a CONTACTS project in Visual Basic 2005. Now I need to know HOW to make a LISTBOX that contains different names of persons with SCROLLBAR and that whenever I click a name, I will see his information (fb, twitter, cp no., tel no. etc.)on the other side of the form (w/c means the form has 2 sides)
I NEED TO FINISH THIS Sad Pls. give me an answer.

Ads

Find all posts by this user
Quote this message in a reply
01-08-2013, 12:53 AM
Post: #2
 
A list box will automatically add a scroll Bar when the list becomes longer than the length of the list box.

However, you can place a scroll bar on the list box at the design time by setting the ScrollAlwaysVisible property to true.

I must guess that by 'has 2 sides', you mean a split screen.

You must indicate what you are placing the people's data into.

The best I can determine is you must do the following;

1 Store the peoples information in a text file.

2. Place the text file lines in an array by using the File.ReadAllLines method., when you click on a person's name in the list box

3. Iterate this array of lines, and create another array of each line with the Str.Split method, using a white space for a delimiter. The person's name should be the first item in the text file. As such, you would look at the first array element of the Str.Split array for a match of the name clicked in the list box.

4. When a match for the selected name is found, display the person's data in the 'other side' of the form.


TexMav

Ads

Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)