Version: 2.9.4
Public Member Functions
wxListView Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/listctrl.h>

Inheritance diagram for wxListView:

Detailed Description

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.

Library:  wxCore
Category:  Controls

Appearance:
wxMSW appearancewxGTK appearancewxMac appearance
wxMSW appearancewxGTK appearancewxMac appearance
参照:
wxListView::SetColumnImage

Public Member Functions

void ClearColumnImage (int col)
 Resets the column image -- after calling this function, no image will be shown.
void Focus (long index)
 Sets focus to the item with the given index.
long GetFirstSelected () const
 Returns the first selected item in a (presumably) multiple selection control.
long GetFocusedItem () const
 Returns the currently focused item or -1 if none.
long GetNextSelected (long item) const
 Used together with GetFirstSelected() to iterate over all selected items in the control.
bool IsSelected (long index) const
 Returns true if the item with the given index is selected, false otherwise.
void Select (long n, bool on=true)
 Selects or unselects the given item.
void SetColumnImage (int col, int image)
 Sets the column image for the specified column.

List of all members.


Member Function Documentation

void wxListView::ClearColumnImage ( int  col)

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

Parameters:
colthe column to clear image for
参照:
SetColumnImage()
void wxListView::Focus ( long  index)

Sets focus to the item with the given index.

long wxListView::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.

Returns:
The first selected item, if any, -1 otherwise.
long wxListView::GetFocusedItem ( ) const

Returns the currently focused item or -1 if none.

参照:
IsSelected(), Focus()
long wxListView::GetNextSelected ( long  item) const

Used together with GetFirstSelected() to iterate over all selected items in the control.

Returns:
Returns the next selected item or -1 if there are no more of them.
bool wxListView::IsSelected ( long  index) const

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

参照:
GetFirstSelected(), GetNextSelected()
void wxListView::Select ( long  n,
bool  on = true 
)

Selects or unselects the given item.

Parameters:
nthe item to select or unselect
onif true (default), selects the item, otherwise unselects it
参照:
wxListCtrl::SetItemState
void wxListView::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:
colthe column to set image for
imagethe index of the column image in the controls image list
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines