DropDown comboBox and gallery

These controls are essentially three styles of drop-down controls, where the gallery drops to show a 2D grid of images and/or labels. The dropDown and comboBox controls can be static, by including their content as <item> controls in the XML. You can populate all three controls at run time by using their getItemCount,getItemID, getItemLabel, getItemImage, getItemScreentip, or getItemSupertip callbacks. At a minimum, you have to use getItemCount to provide the number of items in the list. The remaining getItem callbacks will be called once for each item, with the item index passed in. You are required to provide an ID for each item with getItemID, and will typically provide an image or a label with getItemImage or getItemLabel, respectively. The dropDown and comboBox controls usually look best with images and labels, while the gallery is designed to look best as a grid of images. In all cases, the onAction callback of the dropDown or gallery provides both the selected item's ID and its index as parameters (but not the comboBox, which only has an onChange callback to provide the text).

0 0

Post a comment