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.

継承元

wxListCtrl
wxControl
wxWindow
wxEvtHandler
wxObject

インクルードファイル

<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

参照

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.

参照

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.

参照

GetFirstSelected,
GetNextSelected


wxListView::Select

void Select(long n, bool on = true)

Selects or unselects the given item.

Parameters

n

on

参照

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

参照

ClearColumnImage,
SetImageList