]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/tabctrl.tex
Fixes the problem with VARCHAR fields not allowing the stored string to ever be lengt...
[wxWidgets.git] / docs / latex / wx / tabctrl.tex
1 \section{\class{wxTabCtrl}}\label{wxtabctrl}
2
3 This class represents a tab control, which manages multiple tabs.
4
5 \wxheading{Derived from}
6
7 \helpref{wxControl}{wxcontrol}\\
8 \helpref{wxWindow}{wxwindow}\\
9 \helpref{wxEvtHandler}{wxevthandler}\\
10 \helpref{wxObject}{wxobject}
11
12 \wxheading{Include files}
13
14 <wx/tabctrl.h>
15
16 \wxheading{See also}
17
18 \helpref{wxTabEvent}{wxtabevent}, \helpref{wxImageList}{wximagelist},\rtfsp
19 \helpref{wxNotebook}{wxnotebook}
20
21 \latexignore{\rtfignore{\wxheading{Members}}}
22
23 \membersection{wxTabCtrl::wxTabCtrl}\label{wxtabctrlconstr}
24
25 \func{}{wxTabCtrl}{\void}
26
27 Default constructor.
28
29 \func{}{wxTabCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
30 \param{const wxSize\&}{ size}, \param{long}{ style = 0}, \param{const wxString\& }{name = "tabCtrl"}}
31
32 Constructs a tab control.
33
34 \wxheading{Parameters}
35
36 \docparam{parent}{The parent window. Must be non-NULL.}
37
38 \docparam{id}{The window identifier.}
39
40 \docparam{pos}{The window position.}
41
42 \docparam{size}{The window size.}
43
44 \docparam{style}{The window style. Its value is a bit list of zero or more of {\bf wxTC\_MULTILINE},
45 {\bf wxTC\_RIGHTJUSTIFY}, {\bf wxTC\_FIXEDWIDTH} and {\bf wxTC\_OWNERDRAW}.}
46
47 \membersection{wxTabCtrl::\destruct{wxTabCtrl}}
48
49 \func{}{\destruct{wxTabCtrl}}{\void}
50
51 Destroys the wxTabCtrl object.
52
53 \membersection{wxTabCtrl::Create}\label{wxtabctrlcreate}
54
55 \func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
56 \param{const wxSize\&}{ size}, \param{long}{ style = 0}, \param{const wxString\& }{name = "tabCtrl"}}
57
58 Creates a tab control. See \helpref{wxTabCtrl::wxTabCtrl}{wxtabctrlconstr} for a description
59 of the parameters.
60
61 \membersection{wxTabCtrl::DeleteAllItems}\label{wxtabctrldeleteallitems}
62
63 \func{bool}{DeleteAllItems}{\void}
64
65 Deletes all tab items.
66
67 \membersection{wxTabCtrl::DeleteItem}\label{wxtabctrldeleteitem}
68
69 \func{bool}{DeleteItem}{\param{int}{ item}}
70
71 Deletes the specified tab item.
72
73 \membersection{wxTabCtrl::GetCurFocus}\label{wxtabctrlgetcurfocus}
74
75 \constfunc{int}{GetCurFocus}{\void}
76
77 Returns the index for the tab with the focus, or -1 if none has the focus.
78
79 \membersection{wxTabCtrl::GetImageList}\label{wxtabctrlgetimagelist}
80
81 \constfunc{wxImageList*}{GetImageList}{\void}
82
83 Returns the associated image list.
84
85 \wxheading{See also}
86
87 \helpref{wxImageList}{wximagelist}, \helpref{wxTabCtrl::SetImageList}{wxtabctrlsetimagelist}
88
89 \membersection{wxTabCtrl::GetItemCount}\label{wxtabctrlgetitemcount}
90
91 \constfunc{int}{GetItemCount}{\void}
92
93 Returns the number of tabs in the tab control.
94
95 \membersection{wxTabCtrl::GetItemData}\label{wxtabctrlgetitemdata}
96
97 \constfunc{void*}{GetItemData}{\void}
98
99 Returns the client data for the given tab.
100
101 \membersection{wxTabCtrl::GetItemImage}\label{wxtabctrlgetitemimage}
102
103 \constfunc{int}{GetItemImage}{\void}
104
105 Returns the image index for the given tab.
106
107 \membersection{wxTabCtrl::GetItemRect}\label{wxtabctrlgetitemrect}
108
109 \constfunc{bool}{GetItemRect}{\param{int }{item}, \param{wxRect\&}{ rect}}
110
111 Returns the rectangle bounding the given tab.
112
113 \wxheading{See also}
114
115 \helpref{wxRect}{wxrect}
116
117 \membersection{wxTabCtrl::GetItemText}\label{wxtabctrlgetitemtext}
118
119 \constfunc{wxString}{GetItemText}{\void}
120
121 Returns the string for the given tab.
122
123 \membersection{wxTabCtrl::GetRowCount}\label{wxtabctrlgetrowcount}
124
125 \constfunc{int}{GetRowCount}{\void}
126
127 Returns the number of rows in the tab control.
128
129 \membersection{wxTabCtrl::GetSelection}\label{wxtabctrlgetselection}
130
131 \constfunc{int}{GetSelection}{\void}
132
133 Returns the index for the currently selected tab.
134
135 \wxheading{See also}
136
137 \helpref{wxTabCtrl::SetSelection}{wxtabctrlsetselection}
138
139 \membersection{wxTabCtrl::HitTest}\label{wxtabctrlhittest}
140
141 \func{int}{HitTest}{\param{const wxPoint\&}{ pt}, \param{long\&}{ flags}}
142
143 Tests whether a tab is at the specified position.
144
145 \wxheading{Parameters}
146
147 \docparam{pt}{Specifies the point for the hit test.}
148
149 \docparam{flags}{Return value for detailed information. One of the following values:
150
151 \twocolwidtha{7cm}
152 \begin{twocollist}\itemsep=0pt
153 \twocolitem{{\bf wxTAB\_HITTEST\_NOWHERE}}{There was no tab under this point.}
154 \twocolitem{{\bf wxTAB\_HITTEST\_ONICON}}{The point was over an icon.}
155 \twocolitem{{\bf wxTAB\_HITTEST\_ONLABEL}}{The point was over a label.}
156 \twocolitem{{\bf wxTAB\_HITTEST\_ONITEM}}{The point was over an item, but not on the label or icon.}
157 \end{twocollist}
158 }
159
160 \wxheading{Return value}
161
162 Returns the zero-based tab index or -1 if no tab is at the specified position.
163
164 \membersection{wxTabCtrl::InsertItem}\label{wxtabctrlinsertitem}
165
166 \func{void}{InsertItem}{\param{int}{ item}, \param{const wxString\&}{ text}, \param{int }{imageId = -1},
167 \param{void*}{ clientData = NULL}}
168
169 Inserts a new tab.
170
171 \wxheading{Parameters}
172
173 \docparam{item}{Specifies the index for the new item.}
174
175 \docparam{text}{Specifies the text for the new item.}
176
177 \docparam{imageId}{Specifies the optional image index for the new item.}
178
179 \docparam{clientData}{Specifies the optional client data for the new item.}
180
181 \wxheading{Return value}
182
183 TRUE if successful, FALSE otherwise.
184
185 \membersection{wxTabCtrl::SetItemData}\label{wxtabctrlsetitemdata}
186
187 \func{bool}{SetItemData}{\param{int}{ item}, \param{void*}{ data}}
188
189 Sets the client data for a tab.
190
191 \membersection{wxTabCtrl::SetItemImage}\label{wxtabctrlsetitemimage}
192
193 \func{bool}{SetItemImage}{\param{int}{ item}, \param{int }{image}}
194
195 Sets the image index for the given tab. {\it image} is an index into
196 the image list which was set with \helpref{wxTabCtrl::SetImageList}{wxtabctrlsetimagelist}.
197
198 \membersection{wxTabCtrl::SetImageList}\label{wxtabctrlsetimagelist}
199
200 \func{void}{SetImageList}{\param{wxImageList*}{ imageList}}
201
202 Sets the image list for the tab control.
203
204 \wxheading{See also}
205
206 \helpref{wxImageList}{wximagelist}
207
208 \membersection{wxTabCtrl::SetItemSize}\label{wxtabctrlsetitemsize}
209
210 \func{void}{SetItemSize}{\param{const wxSize\&}{ size}}
211
212 Sets the width and height of the tabs.
213
214 \membersection{wxTabCtrl::SetItemText}\label{wxtabctrlsetitemtext}
215
216 \func{bool}{SetItemText}{\param{int}{ item}, \param{const wxString\& }{text}}
217
218 Sets the text for the given tab.
219
220 \membersection{wxTabCtrl::SetPadding}\label{wxtabctrlsetpadding}
221
222 \func{void}{SetPadding}{\param{const wxSize\&}{ padding}}
223
224 Sets the amount of space around each tab's icon and label.
225
226 \membersection{wxTabCtrl::SetSelection}\label{wxtabctrlsetselection}
227
228 \func{int}{SetSelection}{\param{int}{ item}}
229
230 Sets the selection for the given tab, returning the index of the previously
231 selected tab. Returns -1 if the call was unsuccessful.
232
233 \wxheading{See also}
234
235 \helpref{wxTabCtrl::GetSelection}{wxtabctrlgetselection}
236
237