]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/listview.tex
added vendor display name (for consistency with app display name &c) (patch 1831303)
[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
a7af285d
VZ
36\wxheading{Library}
37
38\helpref{wxCore}{librarieslist}
39
2b5f62a0
VZ
40%%%%%%%%%%%%% Methods in alphabetic order %%%%%%%%%%%%%
41\latexignore{\rtfignore{\wxheading{Members}}}
42
43\membersection{wxListView::ClearColumnImage}\label{wxlistviewclearcolumnimage}
44
45\func{void}{ClearColumnImage}{\param{int }{col}}
46
47Resets the column image -- after calling this function, no image will be shown.
48
49\wxheading{Parameters}
50
51\docparam{col}{the column to clear image for}
52
53\wxheading{See also}
54
55\helpref{SetColumnImage}{wxlistviewsetcolumnimage}
56
57
58\membersection{wxListView::Focus}\label{wxlistviewfocus}
59
60\func{void}{Focus}{\param{long }{index}}
61
62Sets focus to the item with the given {\it index}.
63
64
65\membersection{wxListView::GetFirstSelected}\label{wxlistviewgetfirstselected}
66
67\constfunc{long}{GetFirstSelected}{\void}
68
69Returns the first selected item in a (presumably) multiple selection control.
b253fb5c 70Together with \helpref{GetNextSelected}{wxlistviewgetnextselected} it can be
2b5f62a0
VZ
71used to iterate over all selected items in the control.
72
73\wxheading{Return value}
74
4e43c815 75The first selected item, if any, $-1$ otherwise.
2b5f62a0
VZ
76
77
78\membersection{wxListView::GetFocusedItem}\label{wxlistviewgetfocuseditem}
79
80\constfunc{long}{GetFocusedItem}{\void}
81
82Returns the currently focused item or $-1$ if none.
83
84\wxheading{See also}
85
86\helpref{IsSelected}{wxlistviewisselected},\\
87\helpref{Focus}{wxlistviewfocus}
88
89
90\membersection{wxListView::GetNextSelected}\label{wxlistviewgetnextselected}
91
92\constfunc{long}{GetNextSelected}{\param{long }{item}}
93
94Used together with \helpref{GetFirstSelected}{wxlistviewgetfirstselected} to
f6bb64a6 95iterate over all selected items in the control.
2b5f62a0
VZ
96
97\wxheading{Return value}
98
99Returns the next selected item or $-1$ if there are no more of them.
100
101
102\membersection{wxListView::IsSelected}\label{wxlistviewisselected}
103
53a3a6dc 104\constfunc{bool}{IsSelected}{\param{long }{index}}
2b5f62a0 105
cc81d32f
VS
106Returns {\tt true} if the item with the given {\it index} is selected,
107{\tt false} otherwise.
2b5f62a0
VZ
108
109\wxheading{See also}
110
111\helpref{GetFirstSelected}{wxlistviewgetfirstselected},\\
112\helpref{GetNextSelected}{wxlistviewgetnextselected}
113
114
115\membersection{wxListView::Select}\label{wxlistviewselect}
116
cc81d32f 117\func{void}{Select}{long n, \param{bool }{on = true}}
2b5f62a0
VZ
118
119Selects or unselects the given item.
120
121\wxheading{Parameters}
122
123\docparam{n}{the item to select or unselect}
124
cc81d32f 125\docparam{on}{if {\tt true} (default), selects the item, otherwise unselects it}
2b5f62a0
VZ
126
127\wxheading{See also}
128
129\helpref{SetItemState}{wxlistctrlsetitemstate}
130
131
132\membersection{wxListView::SetColumnImage}\label{wxlistviewsetcolumnimage}
133
134\func{void}{SetColumnImage}{\param{int }{col}, \param{int }{image}}
135
136Sets the column image for the specified column. To use the column images, the
137control must have a valid image list with at least one image.
138
139\wxheading{Parameters}
140
141\docparam{col}{the column to set image for}
142
143\docparam{image}{the index of the column image in the controls image list}
144
145\wxheading{See also}
146
147\helpref{ClearColumnImage}{wxlistviewclearcolumnimage},\\
148\helpref{SetImageList}{wxlistctrlsetimagelist}
149