Small company logo:
   History
 
Advertising banner:
 
 LAS10
Home • Help • Customization Tools • FCAS • LAS10
 
Box arrays are accessed in an identical fashion to arrays. Values can be retrieved or assigned using parentheses and an index. For example:
myBox(23) = "Hi there"
Before any manipulation of box arrays can occur, you must create a list by assigning values to each element of the box array in order, starting from the first element, 0. For example:
Dim i As Integer
For i = 0 to 99
MyBoxOfStrings(i) = "String #" & Stry(i)
Next i
After the list is created, it can't be collapsed. It can be reassigned. If the reassigned list is shorter than the original list, there will be dangling list items.
When a box array item gets focus, its index attribute is set. For example:
Sub Click()
        If MyBoxOfStrings.Index = 10, Then
        Print "You clicked the 10th item in the list"
        End If
End Sub
Box arrays include the Key attribute. In addition to the normal data value associated with an entry in a box array, each entry may now store a second, nondisplaying data value. The data value stored in the Key attribute may be of any type, but, once assigned at run time, this data type can't be changed. For example:
For i = 0 to 100
        BoxArray(i) = "Hi there"
        BoxArray(i).Key = "This is hidden Key #"; Str(i)
Next