Guaranteed Hits to your web site!












Learn Visual Basic 6.0


3. Exploring the Visual Basic Toolbox


List Boxes


List Box

  1. A list box displays a list of items from which the user can select one or more items. If the number of items exceeds the number that can be displayed, a scroll bar is automatically added.

  2. List Box Properties:
  3. List Box Events:
  4. List Box Methods:
    Examples

    lstExample.AddItem "This is an added item" ' adds text string to list
    lstExample.Clear ' clears the list box
    lstExample.RemoveItem 4 ' removes lstExample.List(4) from list box

  5. Items in a list box are usually initialized in a Form_Load procedure. It's always a good idea to Clear a list box before initializing it.

  6. You've seen list boxes before. In the standard 'Open File' window, the Directory box is a list box with MultiSelect equal to zero.


Pen Line


Counter Hit Counter Hit


This Homepage is special brought to you by CK Tan
Hosted by www.Geocities.ws

1