In Visual Basic 6.0 Tutorial explained that the property on the ListBox control will determine whether the sign is displayed or not the checkbox next to each item. If the city checkbox is displayed then the ListBox displays the form of multiple choices by checking the checkboxnya. But if not shown, then only one data that can be selected.
ListBox in VB6 has its own characteristics, ie when the event raised ItemCheck, propertynya has actually changed.
In this control , provides an array of data as a place of shelter data. References it is the index.
Array is an array list that starts from zero on the item STRING and what the user saw. ItemData array is an array of LONG INTEGER items where you can place an optional numeric data item associated with the item strings accordingly. If ItemData used, each element is always in touch with the appropriate element from the array list, which means it is not an independent array.
Listbox in VB6


You can not control the property Listbox in vb6 with a lot of items that will exist in the ListBox. The number of elements in the ListBox is maintained by VB6 through ListCount property. This Propety its read only.

To add data to ListBox in VB6, you can use the AddItem method.
The syntax is:

ListboxName.AddItem string

Jadi jika misalnya anda ingin menempatkan 3 buah data di listbox maka caranya seperti ini.

Listbox1.AddItem "Blue"
Listbox1.AddItem "Red"
Listbox1.AddItem "Black"

Array index data is Blue = 0, Red = 1 and Black = 2. Remember that different from the listbox vb6 listbox in Visual Basic 2005.






<< Privous TopicTop Topic