contents up previous next

wxlistview

this class currently simply presents a simpler to use interface for the wxlistctrl -- it can be thought of as a façade for that complicated class. using it is preferable to using wxlistctrl directly whenever possible because in the future some ports might implement wxlistview but not the full set of wxlistctrl features.

other than different interface, this class is identical to wxlistctrl. in particular, it uses the same events, same window styles and so on.

derived from

wxlistctrl
wxcontrol
wxwindow
wxevthandler
wxobject

include files

<wx/listctrl.h>

members

wxlistview::clearcolumnimage
wxlistview::focus
wxlistview::getfirstselected
wxlistview::getfocuseditem
wxlistview::getnextselected
wxlistview::isselected
wxlistview::select
wxlistview::setcolumnimage


wxlistview::clearcolumnimage

void clearcolumnimage(int col)

resets the column image -- after calling this function, no image will be shown.

parameters

col

see also

setcolumnimage


wxlistview::focus

void focus(long index)

sets focus to the item with the given index.


wxlistview::getfirstselected

long getfirstselected() const

returns the first selected item in a (presumably) multiple selection control. together with getnextselected it can be used to iterate over all selected items in the control.

return value

the first selected item, if any, -1 otherwise.


wxlistview::getfocuseditem

long getfocuseditem() const

returns the currently focused item or -1 if none.

see also

isselected,
focus


wxlistview::getnextselected

long getnextselected(long item) const

used together with getfirstselected to iterate over all selected items in the control.

return value

returns the next selected item or -1 if there are no more of them.


wxlistview::isselected

bool isselected(long index) const

returns true if the item with the given index is selected, false otherwise.

see also

getfirstselected,
getnextselected


wxlistview::select

void select(long n, bool on = true)

selects or unselects the given item.

parameters

n

on

see also

setitemstate


wxlistview::setcolumnimage

void setcolumnimage(int col, int 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.

parameters

col

image

see also

clearcolumnimage,
setimagelist