]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/listview.tex
Spacing tweak
[wxWidgets.git] / docs / latex / wx / listview.tex
CommitLineData
2b5f62a0
VZ
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: listview.tex
3%% Purpose: wxListView documentation
4%% Author: Vadim Zeitlin
5%% Modified by:
6%% Created: 07.11.02
7%% RCS-ID: $Id$
8%% Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwindows.org>
8795498c 9%% License: wxWindows license
2b5f62a0
VZ
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12\section{\class{wxListView}}\label{wxlistview}
13
14This class currently simply presents a simpler to use interface for the
15\helpref{wxListCtrl}{wxlistctrl} -- it can be thought of as a {\it fa\c{c}ade}
16for that complicated class. Using it is preferable to using
17\helpref{wxListCtrl}{wxlistctrl} directly whenever possible because in the
18future some ports might implement wxListView but not the full set of wxListCtrl
19features.
20
21Other than different interface, this class is identical to wxListCtrl. In
4e43c815 22particular, it uses the same events, same window styles and so on.
2b5f62a0
VZ
23
24\wxheading{Derived from}
25
26\helpref{wxListCtrl}{wxlistctrl}\\
27\helpref{wxControl}{wxcontrol}\\
28\helpref{wxWindow}{wxwindow}\\
29\helpref{wxEvtHandler}{wxevthandler}\\
30\helpref{wxObject}{wxobject}
31
32\wxheading{Include files}
33
34<wx/listctrl.h>
35
36%%%%%%%%%%%%% Methods in alphabetic order %%%%%%%%%%%%%
37\latexignore{\rtfignore{\wxheading{Members}}}
38
39\membersection{wxListView::ClearColumnImage}\label{wxlistviewclearcolumnimage}
40
41\func{void}{ClearColumnImage}{\param{int }{col}}
42
43Resets the column image -- after calling this function, no image will be shown.
44
45\wxheading{Parameters}
46
47\docparam{col}{the column to clear image for}
48
49\wxheading{See also}
50
51\helpref{SetColumnImage}{wxlistviewsetcolumnimage}
52
53
54\membersection{wxListView::Focus}\label{wxlistviewfocus}
55
56\func{void}{Focus}{\param{long }{index}}
57
58Sets focus to the item with the given {\it index}.
59
60
61\membersection{wxListView::GetFirstSelected}\label{wxlistviewgetfirstselected}
62
63\constfunc{long}{GetFirstSelected}{\void}
64
65Returns the first selected item in a (presumably) multiple selection control.
66Tigether with \helpref{GetNextSelected}{wxlistviewgetnextselected} it can be
67used to iterate over all selected items in the control.
68
69\wxheading{Return value}
70
4e43c815 71The first selected item, if any, $-1$ otherwise.
2b5f62a0
VZ
72
73
74\membersection{wxListView::GetFocusedItem}\label{wxlistviewgetfocuseditem}
75
76\constfunc{long}{GetFocusedItem}{\void}
77
78Returns the currently focused item or $-1$ if none.
79
80\wxheading{See also}
81
82\helpref{IsSelected}{wxlistviewisselected},\\
83\helpref{Focus}{wxlistviewfocus}
84
85
86\membersection{wxListView::GetNextSelected}\label{wxlistviewgetnextselected}
87
88\constfunc{long}{GetNextSelected}{\param{long }{item}}
89
90Used together with \helpref{GetFirstSelected}{wxlistviewgetfirstselected} to
f6bb64a6 91iterate over all selected items in the control.
2b5f62a0
VZ
92
93\wxheading{Return value}
94
95Returns the next selected item or $-1$ if there are no more of them.
96
97
98\membersection{wxListView::IsSelected}\label{wxlistviewisselected}
99
100\func{bool}{IsSelected}{\param{long }{index}}
101
cc81d32f
VS
102Returns {\tt true} if the item with the given {\it index} is selected,
103{\tt false} otherwise.
2b5f62a0
VZ
104
105\wxheading{See also}
106
107\helpref{GetFirstSelected}{wxlistviewgetfirstselected},\\
108\helpref{GetNextSelected}{wxlistviewgetnextselected}
109
110
111\membersection{wxListView::Select}\label{wxlistviewselect}
112
cc81d32f 113\func{void}{Select}{long n, \param{bool }{on = true}}
2b5f62a0
VZ
114
115Selects or unselects the given item.
116
117\wxheading{Parameters}
118
119\docparam{n}{the item to select or unselect}
120
cc81d32f 121\docparam{on}{if {\tt true} (default), selects the item, otherwise unselects it}
2b5f62a0
VZ
122
123\wxheading{See also}
124
125\helpref{SetItemState}{wxlistctrlsetitemstate}
126
127
128\membersection{wxListView::SetColumnImage}\label{wxlistviewsetcolumnimage}
129
130\func{void}{SetColumnImage}{\param{int }{col}, \param{int }{image}}
131
132Sets the column image for the specified column. To use the column images, the
133control must have a valid image list with at least one image.
134
135\wxheading{Parameters}
136
137\docparam{col}{the column to set image for}
138
139\docparam{image}{the index of the column image in the controls image list}
140
141\wxheading{See also}
142
143\helpref{ClearColumnImage}{wxlistviewclearcolumnimage},\\
144\helpref{SetImageList}{wxlistctrlsetimagelist}
145