h1(#wxlistview). Wx::ListView
This class currently simply presents a simpler to use interface for the
"ListCtrl":listctrl.html -- it can be thought of as a _fa__c__ade_
for that complicated class. Using it is preferable to using
"ListCtrl":listctrl.html directly whenever possible because in the
future some ports might implement ListView but not the full set of ListCtrl
features.
Other than different interface, this class is identical to ListCtrl. In
particular, it uses the same events, same windows styles and so on.
h2. Derived from
"ListCtrl":listctrl.html
"Control":control.html
"Window":window.html
"EvtHandler":evthandler.html
"Object":object.html
h2. Methods
* "ListView#clear_column_image":#ListView_clearcolumnimage
* "ListView#focus":#ListView_focus
* "ListView#get_first_selected":#ListView_getfirstselected
* "ListView#get_focused_item":#ListView_getfocuseditem
* "ListView#get_next_selected":#ListView_getnextselected
* "ListView#is_selected":#ListView_isselected
* "ListView#select":#ListView_select
* "ListView#set_column_image":#ListView_setcolumnimage
h3(#ListView_clearcolumnimage). ListView#clear_column_image
*clear_column_image*(%(arg-type)Integer% col)
Resets the column image -- after calling this function, no image will be shown.
h4. Parameters
* _col_ the column to clear image for
h4. See also
"set_column_image":#ListView_setcolumnimage
h3(#ListView_focus). ListView#focus
*focus*(%(arg-type)Integer% index)
Sets focus to the item with the given _index_.
h3(#ListView_getfirstselected). ListView#get_first_selected
Integer *get_first_selected*()
Returns the first selected item in a (presumably) multiple selection control.
Tigether with "get_next_selected":#ListView_getnextselected it can be
used to iterate over all selected items in the control.
h4. Return value
The fisrt selected item, if any, $-1$ otherwise.
h3(#ListView_getfocuseditem). ListView#get_focused_item
Integer *get_focused_item*()
Returns the currently focused item or $-1$ if none.
h4. See also
"is_selected":#ListView_isselected,
"Focus":listviewfocus.html
h3(#ListView_getnextselected). ListView#get_next_selected
Integer *get_next_selected*(%(arg-type)Integer% item)
Used together with "get_first_selected":#ListView_getfirstselected to
iterate over all selected items in the control.
h4. Return value
Returns the next selected item or $-1$ if there are no more of them.
h3(#ListView_isselected). ListView#is_selected
Boolean *is_selected*(%(arg-type)Integer% index)
Returns @true@ if the item with the given _index_ is selected,
@false@ otherwise.
h4. See also
"get_first_selected":#ListView_getfirstselected,
"get_next_selected":#ListView_getnextselected
h3(#ListView_select). ListView#select
*select*(long n, %(arg-type)Boolean% on = true)
Selects or unselects the given item.
h4. Parameters
* _n_ the item to select or unselect
* _on_ if @true@ (default), selects the item, otherwise unselects it
h4. See also
"set_item_state":#ListView_setitemstate
h3(#ListView_setcolumnimage). ListView#set_column_image
*set_column_image*(%(arg-type)Integer% col, %(arg-type)Integer% image)
Sets the column image for the specified column. To use the column images, the
control must have a valid image list with at least one image.
h4. Parameters
* _col_ the column to set image for
* _image_ the index of the column image in the controls image list
h4. See also
"clear_column_image":#ListView_clearcolumnimage,
"set_image_list":#ListView_setimagelist