Overview | Fields | This Package | All Packages

OverviewFieldsThis PackageAll Packages

ListBox Methods

Constructors Description
ListBox Creates a ListBox control.
Methods Description
addItem Adds an item to the list box, and returns the index of the new item.
addOnDrawItem Assigns a delegate to the drawItem event.
addOnMeasureItem Assigns a delegate to the measureItem event.
addOnSelectedIndexChanged Assigns a delegate to the selectedIndexChanged event.
beginUpdate Maintains performance while items are added to the list box one at a time by preventing the ListBox control from painting until the endUpdate method is called.
endUpdate Resumes painting the ListBox control after painting is suspended by the beginUpdate method.
findString Finds the first item in the list box that starts with the specified string.
findStringExact Finds the first item in the list that exactly matches the string specified in the s parameter.
getBorderStyle Retrieves a value indicating if the list box has a three-dimensional border, a flat single-line border, or no border.
getColumnWidth Retrieves a value indicating the current width of each column in a multicolumn list box.
getDrawMode Retrieves a value indicating whether the system draws the list box, whether the list box owner draws the list box with all items of equal height, or whether the list box owner draws the list box with items of variable height.
getIntegralHeight Retrieves a boolean value indicating whether the list box should resize to avoid showing partial items.
getItem Retrieves the item at the specified zero-based index.
getItemCount Retrieves the number of items in the list box.
getItemHeight Retrieves the height, in pixels, of an item in the list box.
getItemRect Retrieves the bounding rectangle for an item in the list.
getItems Retrieves an Object array containing all the items in the list box.
getMultiColumn Retrieves a boolean value indicating whether the list box supports multiple columns.
getPreferredHeight Retrieves the combined height, in pixels, of all the items in the list box.
getScrollAlwaysVisible For single-column list boxes, retrieves a boolean value indicating whether the scroll bar always appears on the right side of the list, even when all items are visible in the list box without scrolling.
getSelected Retrieves a boolean value indicating whether the specified item is selected.
getSelectedIndex Retrieves the zero-based index of the currently selected item in a single-selection list box.
getSelectedIndices Retrieves an array that contains the zero-based indices of all currently selected items.
getSelectedItem Retrieves the currently selected item in the list.
getSelectedItems Retrieves an array containing all selected items in a list box.
getSelectionMode Retrieves a value indicating how many items in the list box a user can select at one time and how the user can make multiple selections.
getSorted Retrieves a boolean value indicating whether the items in the list box are sorted alphabetically.
getTopIndex Retrieves the zero-based index of the first visible item in a list box.
getUseTabStops Retrieves a boolean value indicating whether a list box can recognize and expand tab characters when drawing its strings.
indexFromPoint Retrieves the zero-based index of the item at the specified coordinates.
insertItem Adds an item to the list box at the specified position.
onDrawItem Triggers the drawItem event.
onMeasureItem Triggers the measureItem event.
onSelectedIndexChanged Triggers the selectedIndexChanged event.
removeAll Removes all items from the list box.
removeItem Removes the specified item from the list box.
removeOnDrawItem Removes the delegate that is assigned to the drawItem event.
removeOnMeasureItem Removes the delegate that is assigned to the measureItem event.
removeOnSelectedIndexChanged Removes the delegate that is assigned to the selectedIndexChanged event.
setBorderStyle Sets a value indicating if the list box has three-dimensional border, a flat single-line border, or no border.
setColumnWidth Sets a value indicating the current width of each column in a multicolumn list box.
setDrawMode Sets a value indicating whether the system draws the list box, whether the list box owner draws the list box with all items of equal height, or whether the list box owner draws the list box with items of variable height.
setIntegralHeight Sets a boolean value indicating whether the list box should resize to avoid showing partial items.
setItem Allows you to replace the item at the specified position in the list box.
setItemHeight Sets the height, in pixels, of an item in the list box.
setItems Adds a set of items to the list box.
setMultiColumn Sets a boolean value indicating whether the list box supports multiple columns.
setScrollAlwaysVisible For single-column list boxes, sets a boolean value indicating whether the scroll bar always appears on right side of the list, even when all items are visible in the list box without scrolling.
setSelected Selects or clears the selection for the specified item in a multiple selection list box.
setSelectedIndex Selects an item in a single-selection list box.
setSelectedItem Selects the first occurrence of the specified item in a single-selection list box, and returns the zero-based index of the item.
setSelectionMode Sets a value indicating how many items in the list box a user can select at one time and how the user can make multiple selections.
setSorted Sets a boolean value indicating whether the items in the list box are sorted alphabetically.
setUseTabStops Sets a boolean value indicating whether a list box can recognize and expand tab characters when drawing its strings.