How do I create a listbox with scroll bar in Visual Basic? - Printable Version +- Twitist Forums (http://twitist.com) +-- Forum: Twitter forums (/forum-1.html) +--- Forum: Twitter abbreviations (/forum-4.html) +--- Thread: How do I create a listbox with scroll bar in Visual Basic? (/thread-53260.html) |
How do I create a listbox with scroll bar in Visual Basic? - Pia Joyce Escasinas - 01-08-2013 12:45 AM 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 Pls. give me an answer. - texasmaverick - 01-08-2013 12:53 AM 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 |