List.setSelection

Sets the receiver's selection to be the given array of items. The current selection is cleared before the new items are selected. <p> Items that are not in the receiver are ignored. If the receiver is single-select and multiple items are specified, then all items are ignored.

@param items the array of items

@exception SWTException <ul> <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> </ul>

@see List#deselectAll() @see List#select(int[]) @see List#setSelection(int[])

  1. void setSelection(int index)
  2. void setSelection(int start, int end)
  3. void setSelection(int[] indices)
  4. void setSelection(String[] items)
    class List
    void
    setSelection
    (
    String[] items
    )

Meta