]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/listview.tex
Added wxDataViewTreeCtrl
[wxWidgets.git] / docs / latex / wx / listview.tex
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>
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \section{\class{wxListView}}\label{wxlistview}
13
14 This 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}
16 for that complicated class. Using it is preferable to using
17 \helpref{wxListCtrl}{wxlistctrl} directly whenever possible because in the
18 future some ports might implement wxListView but not the full set of wxListCtrl
19 features.
20
21 Other than different interface, this class is identical to wxListCtrl. In
22 particular, it uses the same events, same window styles and so on.
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 \wxheading{Library}
37
38 \helpref{wxCore}{librarieslist}
39
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
47 Resets 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
62 Sets focus to the item with the given {\it index}.
63
64
65 \membersection{wxListView::GetFirstSelected}\label{wxlistviewgetfirstselected}
66
67 \constfunc{long}{GetFirstSelected}{\void}
68
69 Returns the first selected item in a (presumably) multiple selection control.
70 Together with \helpref{GetNextSelected}{wxlistviewgetnextselected} it can be
71 used to iterate over all selected items in the control.
72
73 \wxheading{Return value}
74
75 The first selected item, if any, $-1$ otherwise.
76
77
78 \membersection{wxListView::GetFocusedItem}\label{wxlistviewgetfocuseditem}
79
80 \constfunc{long}{GetFocusedItem}{\void}
81
82 Returns 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
94 Used together with \helpref{GetFirstSelected}{wxlistviewgetfirstselected} to
95 iterate over all selected items in the control.
96
97 \wxheading{Return value}
98
99 Returns the next selected item or $-1$ if there are no more of them.
100
101
102 \membersection{wxListView::IsSelected}\label{wxlistviewisselected}
103
104 \constfunc{bool}{IsSelected}{\param{long }{index}}
105
106 Returns {\tt true} if the item with the given {\it index} is selected,
107 {\tt false} otherwise.
108
109 \wxheading{See also}
110
111 \helpref{GetFirstSelected}{wxlistviewgetfirstselected},\\
112 \helpref{GetNextSelected}{wxlistviewgetnextselected}
113
114
115 \membersection{wxListView::Select}\label{wxlistviewselect}
116
117 \func{void}{Select}{long n, \param{bool }{on = true}}
118
119 Selects or unselects the given item.
120
121 \wxheading{Parameters}
122
123 \docparam{n}{the item to select or unselect}
124
125 \docparam{on}{if {\tt true} (default), selects the item, otherwise unselects it}
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
136 Sets the column image for the specified column. To use the column images, the
137 control 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