Once the control has been instantiated, the items populated within the list must then be added one at a
time. You do this using the appendItem method of the List class by passing it a string value
representing the text to be displayed for the item. This can be done as many times as there are items to be
added, and can be called even at run time when the list is visible.
The List control provides a single callback, which is called when an initial item is selected within the
list. This callback is not called on subsequent selections, however, when the list object is set as a multiple
492
Part III: Extending the Possibilities
selection list, though will still be called should the selected items be cleared and a new initial item
selected. At any time, the selected item details can be retrieved through querying the selectedItems
property. The returned value and type is dependent upon the type of the list. Table 17 - 9 details the
values returned by the selectedItems property for the List control, based on its characterization.
Pages:
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913