1 \section{\class{wxTabCtrl
}}\label{wxtabctrl
}
3 This class represents a tab control, which manages multiple tabs.
5 \wxheading{Derived from
}
7 \helpref{wxControl
}{wxcontrol
}\\
8 \helpref{wxWindow
}{wxwindow
}\\
9 \helpref{wxEvtHandler
}{wxevthandler
}\\
10 \helpref{wxObject
}{wxobject
}
14 \helpref{wxTabEvent
}{wxtabevent
},
\helpref{wxImageList
}{wximagelist
}
16 \latexignore{\rtfignore{\wxheading{Members
}}}
18 \membersection{wxTabCtrl::wxTabCtrl
}\label{wxtabctrlconstr
}
20 \func{}{wxTabCtrl
}{\void}
24 \func{}{wxTabCtrl
}{\param{wxWindow*
}{ parent
},
\param{wxWindowID
}{id
},
\param{const wxPoint\&
}{ pos = wxDefaultPosition
},
25 \param{const wxSize\&
}{ size
},
\param{long
}{ style =
0},
\param{const wxString\&
}{name = "tabCtrl"
}}
27 Constructs a tab control.
29 \wxheading{Parameters
}
31 \docparam{parent
}{The parent window. Must be non-NULL.
}
33 \docparam{id
}{The window identifier.
}
35 \docparam{pos
}{The window position.
}
37 \docparam{size
}{The window size.
}
39 \docparam{style
}{The window style. Its value is a bit list of zero or more of
{\bf wxTC
\_MULTILINE},
40 {\bf wxTC
\_RIGHTJUSTIFY},
{\bf wxTC
\_FIXEDWIDTH} and
{\bf wxTC
\_OWNERDRAW}.
}
42 \membersection{wxTabCtrl::
\destruct{wxTabCtrl
}}
44 \func{}{\destruct{wxTabCtrl
}}{\void}
46 Destroys the wxTabCtrl object.
48 \membersection{wxTabCtrl::Create
}\label{wxtabctrlcreate
}
50 \func{bool
}{Create
}{\param{wxWindow*
}{ parent
},
\param{wxWindowID
}{id
},
\param{const wxPoint\&
}{ pos = wxDefaultPosition
},
51 \param{const wxSize\&
}{ size
},
\param{long
}{ style =
0},
\param{const wxString\&
}{name = "tabCtrl"
}}
53 Creates a tab control. See
\helpref{wxTabCtrl::wxTabCtrl
}{wxtabctrlconstr
} for a description
56 \membersection{wxTabCtrl::DeleteAllItems
}\label{wxtabctrldeleteallitems
}
58 \func{bool
}{DeleteAllItems
}{\void}
60 Deletes all tab items.
62 \membersection{wxTabCtrl::DeleteItem
}\label{wxtabctrldeleteitem
}
64 \func{bool
}{DeleteItem
}{\param{int
}{ item
}}
66 Deletes the specified tab item.
68 \membersection{wxTabCtrl::GetImageList
}\label{wxtabctrlgetimagelist
}
70 \constfunc{wxImageList*
}{GetImageList
}{\void}
72 Returns the associated image list.
76 \helpref{wxImageList
}{wximagelist
},
\helpref{wxTabCtrl::SetImageList
}{wxtabctrlsetimagelist
}
78 \membersection{wxTabCtrl::GetItemCount
}\label{wxtabctrlgetitemcount
}
80 \constfunc{int
}{GetItemCount
}{\void}
82 Returns the number of tabs in the tab control.
84 \membersection{wxTabCtrl::GetItemData
}\label{wxtabctrlgetitemdata
}
86 \constfunc{void*
}{GetItemData
}{\void}
88 Returns the client data for the given tab.
90 \membersection{wxTabCtrl::GetItemImage
}\label{wxtabctrlgetitemimage
}
92 \constfunc{int
}{GetItemImage
}{\void}
94 Returns the image index for the given tab.
96 \membersection{wxTabCtrl::GetItemRect
}\label{wxtabctrlgetitemrect
}
98 \constfunc{bool
}{GetItemRect
}{\param{int
}{item
},
\param{wxRect\&
}{ rect
}}
100 Returns the rectangle bounding the given tab.
104 \helpref{wxRect
}{wxrect
}
106 \membersection{wxTabCtrl::GetItemText
}\label{wxtabctrlgetitemtext
}
108 \constfunc{wxString
}{GetItemText
}{\void}
110 Returns the string for the given tab.
112 \membersection{wxTabCtrl::GetRowCount
}\label{wxtabctrlgetrowcount
}
114 \constfunc{bool
}{GetRowCount
}{\void}
116 Returns the number of rows in the tab control.
118 \membersection{wxTabCtrl::GetSelection
}\label{wxtabctrlgetselection
}
120 \constfunc{int
}{GetSelection
}{\void}
122 Returns the index for the currently selected tab.
126 \helpref{wxTabCtrl::SetSelection
}{wxtabctrlsetselection
}
128 \membersection{wxTabCtrl::HitTest
}\label{wxtabctrlhittest
}
130 \func{int
}{HitTest
}{\param{const wxPoint\&
}{ pt
},
\param{long\&
}{ flags
}}
132 Tests whether a tab is at the specified position.
134 \wxheading{Parameters
}
136 \docparam{pt
}{Specifies the point for the hit test.
}
138 \docparam{flags
}{Return value for detailed information. One of the following values:
141 \begin{twocollist
}\itemsep=
0pt
142 \twocolitem{{\bf wxTAB
\_HITTEST\_NOWHERE}}{There was no tab under this point.
}
143 \twocolitem{{\bf wxTAB
\_HITTEST\_ONICON}}{The point was over an icon.
}
144 \twocolitem{{\bf wxTAB
\_HITTEST\_ONLABEL}}{The point was over a label.
}
145 \twocolitem{{\bf wxTAB
\_HITTEST\_ONITEM}}{The point was over an item, but not on the label or icon.
}
149 \wxheading{Return value
}
151 Returns the zero-based tab index or -
1 if no tab is at the specified position.
153 \membersection{wxTabCtrl::InsertItem
}\label{wxtabctrlinsertitem
}
155 \func{void
}{InsertItem
}{\param{int
}{ item
},
\param{const wxString\&
}{ text
},
\param{int
}{imageId = -
1},
156 \param{void*
}{ clientData = NULL
}}
160 \wxheading{Parameters
}
162 \docparam{item
}{Specifies the index for the new item.
}
164 \docparam{text
}{Specifies the text for the new item.
}
166 \docparam{imageId
}{Specifies the optional image index for the new item.
}
168 \docparam{clientData
}{Specifies the optional client data for the new item.
}
170 \wxheading{Return value
}
172 TRUE if successful, FALSE otherwise.
174 \membersection{wxTabCtrl::SetItemData
}\label{wxtabctrlsetitemdata
}
176 \func{bool
}{SetItemData
}{\param{int
}{ item
},
\param{void*
}{ data
}}
178 Sets the client data for a tab.
180 \membersection{wxTabCtrl::SetItemImage
}\label{wxtabctrlsetitemimage
}
182 \func{bool
}{SetItemImage
}{\param{int
}{ item
},
\param{int
}{image
}}
184 Sets the image index for the given tab.
{\it image
} is an index into
185 the image list which was set with
\helpref{wxTabCtrl::SetImageList
}{setimagelist
}.
187 \membersection{wxTabCtrl::SetImageList
}\label{wxtabctrlsetimagelist
}
189 \func{void
}{SetImageList
}{\param{wxImageList*
}{ imageList
}}
191 Sets the image list for the tab control.
195 \helpref{wxImageList
}{wximagelist
}
197 \membersection{wxTabCtrl::SetItemSize
}\label{wxtabctrlsetitemsize
}
199 \func{void
}{SetItemSize
}{\param{const wxSize\&
}{ size
}}
201 Sets the width and height of the tabs.
203 \membersection{wxTabCtrl::SetItemText
}\label{wxtabctrlsetitemtext
}
205 \func{bool
}{SetItemText
}{\param{int
}{ item
},
\param{const wxString\&
}{text
}}
207 Sets the text for the given tab.
209 \membersection{wxTabCtrl::SetPadding
}\label{wxtabctrlsetpadding
}
211 \func{void
}{SetPadding
}{\param{const wxSize\&
}{ padding
}}
213 Sets the amount of space around each tab's icon and label.
215 \membersection{wxTabCtrl::SetSelection
}\label{wxtabctrlsetselection
}
217 \func{int
}{SetSelection
}{\param{int
}{ item
}}
219 Sets the selection for the given tab, returning the index of the previously
220 selected tab. Returns -
1 if the call was unsuccessful.
224 \helpref{wxTabCtrl::GetSelection
}{wxtabctrlgetselection
}