c360bf5beb
Otto Wyss git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1081 lines
41 KiB
TeX
1081 lines
41 KiB
TeX
\section{\class{wxTreeListCtrl}}\label{wxtreelistctrl}
|
|
|
|
A tree list control presents information as a hierarchy, with items that may be expanded
|
|
to show further items. Items in a tree list control are referenced by wxTreeItemId handles,
|
|
which may be tested for validity by calling wxTreeItemId::IsOk.
|
|
|
|
To intercept events from a tree list control, use the event table macros described in \helpref{wxTreeEvent}{wxtreeevent}.
|
|
|
|
\wxheading{Derived from}
|
|
|
|
\helpref{wxControl}{wxcontrol}\\
|
|
wxListCtrl\\
|
|
wxTreeCtrl\\
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
\wxheading{Include files}
|
|
|
|
<wx/treelistctrl.h>
|
|
|
|
\wxheading{Window styles}
|
|
|
|
\twocolwidtha{5cm}
|
|
\begin{twocollist}\itemsep=0pt
|
|
\twocolitem{\windowstyle{wxTR\_EDIT\_LABELS}}{Use this style
|
|
if you wish the user to be able to edit labels in the tree list control.}
|
|
\twocolitem{\windowstyle{wxTR\_NO\_BUTTONS}}{For convenience
|
|
to document that no buttons are to be drawn.}
|
|
\twocolitem{\windowstyle{wxTR\_HAS\_BUTTONS}}{Use this style
|
|
to show + and - buttons to the left of parent items.}
|
|
\twocolitem{\windowstyle{wxTR\_TWIST\_BUTTONS}}{Use this style
|
|
to show Mac-style twister buttons to the left of parent items.
|
|
If both wxTR\_HAS\_BUTTONS and wxTR\_TWIST\_BUTTONS are given,
|
|
twister buttons are generated. Generic only.}
|
|
\twocolitem{\windowstyle{wxTR\_NO\_LINES}}{Use this style
|
|
to hide vertical level connectors.}
|
|
\twocolitem{\windowstyle{wxTR\_FULL\_ROW\_HIGHLIGHT}}{Use this style to have the background
|
|
colour and the selection highlight extend over the entire horizontal
|
|
row of the tree list control window. (This flag is ignored under Windows unless you
|
|
specify wxTR\_NO\_LINES as well.) }
|
|
\twocolitem{\windowstyle{wxTR\_LINES\_AT\_ROOT}}{Use this style
|
|
to show lines between root nodes.
|
|
Only applicable if wxTR\_HIDE\_ROOT is set and wxTR\_NO\_LINES is not set.}
|
|
\twocolitem{\windowstyle{wxTR\_HIDE\_ROOT}}{Use this style
|
|
to suppress the display of the root node,
|
|
effectively causing the first-level nodes
|
|
to appear as a series of root nodes.}
|
|
\twocolitem{\windowstyle{wxTR\_ROW\_LINES}}{Use this style
|
|
to draw a contrasting border between displayed rows.}
|
|
\twocolitem{\windowstyle{wxTR\_HAS\_VARIABLE\_ROW\_HEIGHT}}{Use this style
|
|
to cause row heights to be just big enough to fit the content.
|
|
If not set, all rows use the largest row height.
|
|
The default is that this flag is unset.
|
|
Generic only.}
|
|
\twocolitem{\windowstyle{wxTR\_SINGLE}}{For convenience
|
|
to document that only one item may be selected at a time.
|
|
Selecting another item causes the current selection, if any,
|
|
to be deselected. This is the default.}
|
|
\twocolitem{\windowstyle{wxTR\_MULTIPLE}}{Use this style
|
|
to allow a range of items to be selected.
|
|
If a second range is selected, the current range, if any, is deselected.}
|
|
\twocolitem{\windowstyle{wxTR\_EXTENDED}}{Use this style
|
|
to allow disjoint items to be selected. (Only partially implemented; may not work in all cases.)}
|
|
\twocolitem{\windowstyle{wxTR\_DEFAULT\_STYLE}}{The set of flags that are
|
|
closest to the defaults for the native control for a particular toolkit.}
|
|
\end{twocollist}
|
|
|
|
See also \helpref{window styles overview}{windowstyles}.
|
|
|
|
\wxheading{Event handling}
|
|
|
|
To process input from a tree list control, use these event handler macros to direct input to member
|
|
functions that take a \helpref{wxTreeEvent}{wxtreeevent} argument.
|
|
|
|
\twocolwidtha{7cm}
|
|
\begin{twocollist}\itemsep=0pt
|
|
\twocolitem{{\bf EVT\_TREE\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.}
|
|
\twocolitem{{\bf EVT\_TREE\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.}
|
|
\twocolitem{{\bf EVT\_TREE\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
|
|
\twocolitem{{\bf EVT\_TREE\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
|
|
\twocolitem{{\bf EVT\_TREE\_DELETE\_ITEM(id, func)}}{Delete an item.}
|
|
\twocolitem{{\bf EVT\_TREE\_GET\_INFO(id, func)}}{Request information from the application.}
|
|
\twocolitem{{\bf EVT\_TREE\_SET\_INFO(id, func)}}{Information is being supplied.}
|
|
\twocolitem{{\bf EVT\_TREE\_ITEM\_ACTIVATED(id, func)}}{The item has been activated, i.e. chosen by double clicking it with mouse or from keyboard}
|
|
\twocolitem{{\bf EVT\_TREE\_ITEM\_COLLAPSED(id, func)}}{The item has been collapsed.}
|
|
\twocolitem{{\bf EVT\_TREE\_ITEM\_COLLAPSING(id, func)}}{The item is being collapsed. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
|
|
\twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDED(id, func)}}{The item has been expanded.}
|
|
\twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDING(id, func)}}{The item is being expanded. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
|
|
\twocolitem{{\bf EVT\_TREE\_SEL\_CHANGED(id, func)}}{Selection has changed.}
|
|
\twocolitem{{\bf EVT\_TREE\_SEL\_CHANGING(id, func)}}{Selection is changing. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
|
|
\twocolitem{{\bf EVT\_TREE\_KEY\_DOWN(id, func)}}{A key has been pressed.}
|
|
\end{twocollist}
|
|
|
|
\wxheading{See also}
|
|
|
|
wxTreeItemData, wxListBox, wxListCtrl,\rtfsp
|
|
wxImageList, wxTreeEvent
|
|
|
|
\wxheading{Win32 notes}
|
|
|
|
wxTreeListCtrl class uses the standard common treeview control under Win32
|
|
implemented in the system library {\tt comctl32.dll}. Some versions of this
|
|
library are known to have bugs with handling the tree list control colours: the
|
|
usual symptom is that the expanded items leave black (or otherwise incorrectly
|
|
coloured) background behind them, especially for the controls using non
|
|
default background colour. The recommended solution is to upgrade the {\tt comctl32.dll}
|
|
to a newer version: see
|
|
\urlref{http://www.microsoft.com/msdownload/ieplatform/ie/comctrlx86.asp}{http://www.microsoft.com/msdownload/ieplatform/ie/comctrlx86.asp}.
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members (tree specific}}}
|
|
|
|
\membersection{wxTreeListCtrl::wxTreeListCtrl}\label{wxtreelistctrlconstr}
|
|
|
|
\func{}{wxTreeListCtrl}{\void}
|
|
|
|
Default constructor.
|
|
|
|
\func{}{wxTreeListCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id = -1},\rtfsp
|
|
\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
|
|
\param{long}{ style = wxTR\_DEFAULT\_STYLE}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``treelistctrl"}}
|
|
|
|
Constructor, creating and showing a tree list control.
|
|
|
|
\wxheading{Parameters}
|
|
|
|
\docparam{parent}{Parent window. Must not be NULL.}
|
|
|
|
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
|
|
|
|
\docparam{pos}{Window position.}
|
|
|
|
\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
|
|
appropriately.}
|
|
|
|
\docparam{style}{Window style. See \helpref{wxTreeListCtrl}{wxtreelistctrl}.}
|
|
|
|
\docparam{validator}{Window validator.}
|
|
|
|
\docparam{name}{Window name.}
|
|
|
|
\wxheading{See also}
|
|
|
|
\helpref{wxTreeListCtrl::Create}{wxtreelistctrlcreate}, \helpref{wxValidator}{wxvalidator}
|
|
|
|
\membersection{wxTreeListCtrl::\destruct{wxTreeListCtrl}}
|
|
|
|
\func{void}{\destruct{wxTreeListCtrl}}{\void}
|
|
|
|
Destructor, destroying the list control.
|
|
|
|
\membersection{wxTreeListCtrl::AddRoot}\label{wxtreelistctrladdroot}
|
|
|
|
\func{wxTreeItemId}{AddRoot}{\param{const wxString\&}{ text},
|
|
\param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = NULL}}
|
|
|
|
Adds the root node to the tree, returning the new item.
|
|
|
|
The {\it image} and {\it selImage} parameters are an index within
|
|
the normal image list specifying the image to use for unselected and
|
|
selected items, respectively.
|
|
If {\it image} > -1 and {\it selImage} is -1, the same image is used for
|
|
both selected and unselected items.
|
|
|
|
\membersection{wxTreeListCtrl::AppendItem}\label{wxtreelistctrlappenditem}
|
|
|
|
\func{wxTreeItemId}{AppendItem}{\param{const wxTreeItemId\& }{parent}, \param{const wxString\&}{ text},
|
|
\param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = NULL}}
|
|
|
|
Appends an item to the end of the branch identified by {\it parent}, return a new item id.
|
|
|
|
The {\it image} and {\it selImage} parameters are an index within
|
|
the normal image list specifying the image to use for unselected and
|
|
selected items, respectively.
|
|
If {\it image} > -1 and {\it selImage} is -1, the same image is used for
|
|
both selected and unselected items.
|
|
|
|
\membersection{wxTreeListCtrl::AssignButtonsImageList}\label{wxtreelistctrlassignbuttonsimagelist}
|
|
|
|
\func{void}{AssignButtonsImageList}{\param{wxImageList*}{ imageList}}
|
|
|
|
Sets the buttons image list. The button images assigned with this method will
|
|
be automatically deleted by wxTreeListCtrl as appropriate
|
|
(i.e. it takes ownership of the list).
|
|
|
|
Setting or assigning the button image list enables the display of image buttons.
|
|
Once enabled, the only way to disable the display of button images is to set
|
|
the button image list to NULL.
|
|
|
|
This function is only available in the generic version.
|
|
|
|
See also \helpref{SetButtonsImageList}{wxtreelistctrlsetbuttonsimagelist}.
|
|
|
|
\membersection{wxTreeListCtrl::AssignImageList}\label{wxtreelistctrlassignimagelist}
|
|
|
|
\func{void}{AssignImageList}{\param{wxImageList*}{ imageList}}
|
|
|
|
Sets the normal image list. Image list assigned with this method will
|
|
be automatically deleted by wxTreeListCtrl as appropriate
|
|
(i.e. it takes ownership of the list).
|
|
|
|
See also \helpref{SetImageList}{wxtreelistctrlsetimagelist}.
|
|
|
|
\membersection{wxTreeListCtrl::AssignStateImageList}\label{wxtreelistctrlassignstateimagelist}
|
|
|
|
\func{void}{AssignStateImageList}{\param{wxImageList*}{ imageList}}
|
|
|
|
Sets the state image list. Image list assigned with this method will
|
|
be automatically deleted by wxTreeListCtrl as appropriate
|
|
(i.e. it takes ownership of the list).
|
|
|
|
See also \helpref{SetStateImageList}{wxtreelistctrlsetstateimagelist}.
|
|
|
|
|
|
\membersection{wxTreeListCtrl::Collapse}\label{wxtreelistctrlcollapse}
|
|
|
|
\func{void}{Collapse}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Collapses the given item.
|
|
|
|
\membersection{wxTreeListCtrl::CollapseAndReset}\label{wxtreelistctrlcollapseandreset}
|
|
|
|
\func{void}{CollapseAndReset}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Collapses the given item and removes all children.
|
|
|
|
\membersection{wxTreeListCtrl::Create}\label{wxtreelistctrlcreate}
|
|
|
|
\func{bool}{wxTreeListCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id = -1},\rtfsp
|
|
\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
|
|
\param{long}{ style = wxTR\_DEFAULT\_STYLE}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listCtrl"}}
|
|
|
|
Creates the tree list control. See \helpref{wxTreeListCtrl::wxTreeListCtrl}{wxtreelistctrlconstr} for further details.
|
|
|
|
\membersection{wxTreeListCtrl::Delete}\label{wxtreelistctrldelete}
|
|
|
|
\func{void}{Delete}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Deletes the specified item. A {\tt EVT\_TREE\_DELETE\_ITEM} event will be
|
|
generated.
|
|
|
|
This function may cause a subsequent call to GetNextChild to fail.
|
|
|
|
\membersection{wxTreeListCtrl::DeleteAllItems}\label{wxtreelistctrldeleteallitems}
|
|
|
|
\func{void}{DeleteAllItems}{\void}
|
|
|
|
Deletes all the items in the control. Note that this will {\bf not} generate
|
|
any events unlike \helpref{Delete}{wxtreelistctrldelete} method.
|
|
|
|
\membersection{wxTreeListCtrl::DeleteChildren}\label{wxtreelistctrldeletechildren}
|
|
|
|
\func{void}{DeleteChildren}{\param{const wxTreeItemId\& }{item}}
|
|
|
|
Deletes all children of the given item (but not the item itself). Note that
|
|
this will {\bf not} generate any events unlike
|
|
\helpref{Delete}{wxtreelistctrldelete} method.
|
|
|
|
If you have called \helpref{wxTreeListCtrl::SetItemHasChildren}{wxtreelistctrlsetitemhaschildren}, you
|
|
may need to call it again since {\it DeleteChildren} does not automatically
|
|
clear the setting.
|
|
|
|
\membersection{wxTreeListCtrl::Edit}\label{wxtreelistctrledit}
|
|
|
|
\func{void}{Edit}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
The same as \helpref{EditLabel}{wxtreelistctrleditlabel}.
|
|
|
|
\membersection{wxTreeListCtrl::EditLabel}\label{wxtreelistctrleditlabel}
|
|
|
|
\func{void}{EditLabel}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Starts editing the label of the given item. This function generates a
|
|
EVT\_TREE\_BEGIN\_LABEL\_EDIT event which can be vetoed so that no
|
|
text control will appear for in-place editing.
|
|
|
|
If the user changed the label, i.e. s/he does not press ESC or leave
|
|
the text control without changes, a EVT\_TREE\_END\_LABEL\_EDIT event
|
|
will be sent which can be vetoed as well.
|
|
|
|
\wxheading{See also}
|
|
|
|
\helpref{wxTreeEvent}{wxtreeevent}
|
|
|
|
\membersection{wxTreeListCtrl::EnsureVisible}\label{wxtreelistctrlensurevisible}
|
|
|
|
\func{void}{EnsureVisible}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Scrolls and/or expands items to ensure that the given item is visible.
|
|
|
|
\membersection{wxTreeListCtrl::Expand}\label{wxtreelistctrlexpand}
|
|
|
|
\func{void}{Expand}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Expands the given item.
|
|
|
|
\membersection{wxTreeListCtrl::ExpandAll}\label{wxtreelistctrlexpandall}
|
|
|
|
\func{void}{ExpandAll}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Expands the given item and all subitems recursively.
|
|
|
|
\membersection{wxTreeListCtrl::GetBoundingRect}\label{wxtreelistctrlgetitemrect}
|
|
|
|
\constfunc{bool}{GetBoundingRect}{\param{const wxTreeItemId\&}{ item}, \param{wxRect\& }{rect}, \param{bool }{textOnly = FALSE}}
|
|
|
|
Retrieves the rectangle bounding the {\it item}. If {\it textOnly} is TRUE,
|
|
only the rectangle around the item's label will be returned, otherwise the
|
|
item's image is also taken into account.
|
|
|
|
The return value is TRUE if the rectangle was successfully retrieved or FALSE
|
|
if it was not (in this case {\it rect} is not changed) - for example, if the
|
|
item is currently invisible.
|
|
|
|
\pythonnote{The wxPython version of this method requires only the
|
|
{\tt item} and {\tt textOnly} parameters. The return value is either a
|
|
{\tt wxRect} object or {\tt None}.}
|
|
|
|
\perlnote{In wxPerl this method only takes the parameters {\tt item} and
|
|
{\tt textOnly}, and returns a Wx::Rect ( or undef ).}
|
|
|
|
\membersection{wxTreeListCtrl::GetButtonsImageList}\label{wxtreelistctrlgetbuttonsimagelist}
|
|
|
|
\constfunc{wxImageList*}{GetButtonsImageList}{\void}
|
|
|
|
Returns the buttons image list (from which application-defined button images are taken).
|
|
|
|
This function is only available in the generic version.
|
|
|
|
\membersection{wxTreeListCtrl::GetChildrenCount}\label{wxtreelistctrlgetchildrencount}
|
|
|
|
\constfunc{size\_t}{GetChildrenCount}{\param{const wxTreeItemId\&}{ item}, \param{bool}{ recursively = TRUE}}
|
|
|
|
Returns the number of items in the branch. If {\it recursively} is TRUE, returns the total number
|
|
of descendants, otherwise only one level of children is counted.
|
|
|
|
\membersection{wxTreeListCtrl::GetCount}\label{wxtreelistctrlgetcount}
|
|
|
|
\constfunc{int}{GetCount}{\void}
|
|
|
|
Returns the number of items in the control.
|
|
|
|
\membersection{wxTreeListCtrl::GetFirstChild}\label{wxtreelistctrlgetfirstchild}
|
|
|
|
\constfunc{wxTreeItemId}{GetFirstChild}{\param{const wxTreeItemId\&}{ item}, \param{long\& }{cookie}}
|
|
|
|
Returns the first child; call \helpref{wxTreeListCtrl::GetNextChild}{wxtreelistctrlgetnextchild} for the next child.
|
|
|
|
For this enumeration function you must pass in a `cookie' parameter
|
|
which is opaque for the application but is necessary for the library
|
|
to make these functions reentrant (i.e. allow more than one
|
|
enumeration on one and the same object simultaneously). The cookie passed to
|
|
GetFirstChild and GetNextChild should be the same variable.
|
|
|
|
Returns an invalid tree item if there are no further children.
|
|
|
|
\wxheading{See also}
|
|
|
|
\membersection{wxTreeListCtrl::GetHeaderWindow}\label{wxtreelistctrlgetheaderwindow}
|
|
|
|
\constfunc{wxTreeListHeaderWindow*}{GetHeaderWindow}{\void}
|
|
|
|
Returns the pointer to the header window.
|
|
|
|
\membersection{wxTreeListCtrl::GetMainWindow}\label{wxtreelistctrlgetmainwindow}
|
|
|
|
\constfunc{wxTreeListMainWindow*}{GetMainWindow}{\void}
|
|
|
|
Returns the pointer to the main window.
|
|
|
|
\helpref{wxTreeListCtrl::GetNextChild}{wxtreelistctrlgetnextchild},
|
|
\helpref{wxTreeListCtrl::GetNextSibling}{wxtreelistctrlgetnextsibling}
|
|
|
|
\pythonnote{In wxPython the returned wxTreeItemId and the new cookie
|
|
value are both returned as a tuple containing the two values.}
|
|
|
|
\perlnote{In wxPerl this method only takes the {\tt item} parameter, and
|
|
returns a 2-element list {\tt ( item, cookie )}.}
|
|
|
|
\membersection{wxTreeListCtrl::GetFirstVisibleItem}\label{wxtreelistctrlgetfirstvisibleitem}
|
|
|
|
\constfunc{wxTreeItemId}{GetFirstVisibleItem}{\void}
|
|
|
|
Returns the first visible item.
|
|
|
|
\membersection{wxTreeListCtrl::GetImageList}\label{wxtreelistctrlgetimagelist}
|
|
|
|
\constfunc{wxImageList*}{GetImageList}{\void}
|
|
|
|
Returns the normal image list.
|
|
|
|
\membersection{wxTreeListCtrl::GetIndent}\label{wxtreelistctrlgetindent}
|
|
|
|
\constfunc{int}{GetIndent}{\void}
|
|
|
|
Returns the current tree list control indentation.
|
|
|
|
\membersection{wxTreeListCtrl::GetItemBackgroundColour}\label{wxtreelistctrlgetitembackgroundcolour}
|
|
|
|
\constfunc{wxColour}{GetItemBackgroundColour}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns the background colour of the item.
|
|
|
|
\membersection{wxTreeListCtrl::GetItemData}\label{wxtreelistctrlgetitemdata}
|
|
|
|
\constfunc{wxTreeItemData*}{GetItemData}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns the tree item data associated with the item.
|
|
|
|
\wxheading{See also}
|
|
|
|
\helpref{wxTreeItemData}{wxtreeitemdata}
|
|
|
|
\pythonnote{wxPython provides the following shortcut method:
|
|
|
|
\indented{2cm}{\begin{twocollist}\itemsep=0pt
|
|
\twocolitem{{\bf GetPyData(item)}}{Returns the Python Object
|
|
associated with the wxTreeItemData for the given item Id.}
|
|
\end{twocollist}}
|
|
}
|
|
|
|
\perlnote{wxPerl provides the following shortcut method:
|
|
\indented{2cm}{
|
|
\begin{twocollist}\itemsep=0pt
|
|
\twocolitem{{\bf GetPlData( item )}}{Returns the Perl data
|
|
associated with the Wx::TreeItemData ( it is just the same as
|
|
tree->GetItemData( item )->GetData(); ).}
|
|
\end{twocollist}}
|
|
}
|
|
|
|
\membersection{wxTreeListCtrl::GetItemFont}\label{wxtreelistctrlgetitemfont}
|
|
|
|
\constfunc{wxFont}{GetItemFont}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns the font of the item label.
|
|
|
|
\membersection{wxTreeListCtrl::GetItemImage}\label{wxtreelistctrlgetitemimage}
|
|
|
|
\constfunc{int}{GetItemImage}{\param{const wxTreeItemId\&}{ item},
|
|
\param{wxTreeItemIcon}{ which = wxTreeItemIcon_Normal}}
|
|
|
|
Gets the specified item image of the main column.
|
|
|
|
\constfunc{int}{GetItemImage}{\param{const wxTreeItemId\&}{ item}, \param{size_t}{ column},
|
|
\param{wxTreeItemIcon}{ which = wxTreeItemIcon_Normal}}
|
|
|
|
Gets the specified item image of the entered column.
|
|
|
|
The value of {\it which} may be:
|
|
|
|
\begin{itemize}\itemsep=0pt
|
|
\item{wxTreeItemIcon\_Normal} to get the normal item image
|
|
\item{wxTreeItemIcon\_Selected} to get the selected item image (i.e. the image
|
|
which is shown when the item is currently selected)
|
|
\item{wxTreeItemIcon\_Expanded} to get the expanded image (this only
|
|
makes sense for items which have children - then this image is shown when the
|
|
item is expanded and the normal image is shown when it is collapsed)
|
|
\item{wxTreeItemIcon\_SelectedExpanded} to get the selected expanded image
|
|
(which is shown when an expanded item is currently selected)
|
|
\end{itemize}
|
|
|
|
\membersection{wxTreeListCtrl::GetItemText}\label{wxtreelistctrlgetitemtext}
|
|
|
|
\constfunc{wxString}{GetItemText}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns the item text of the main column.
|
|
|
|
\constfunc{wxString}{GetItemText}{\param{const wxTreeItemId\&}{ item}, \param{size_t}{ column}}
|
|
|
|
Returns the item text of the entered column.
|
|
|
|
\membersection{wxTreeListCtrl::GetItemTextColour}\label{wxtreelistctrlgetitemtextcolour}
|
|
|
|
\constfunc{wxColour}{GetItemTextColour}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns the colour of the item label.
|
|
|
|
\membersection{wxTreeListCtrl::GetLastChild}\label{wxtreelistctrlgetlastchild}
|
|
|
|
\constfunc{wxTreeItemId}{GetLastChild}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns the last child of the item (or an invalid tree item if this item has no children).
|
|
|
|
\wxheading{See also}
|
|
|
|
\helpref{GetFirstChild}{wxtreelistctrlgetfirstchild},
|
|
\helpref{wxTreeListCtrl::GetNextSibling}{wxtreelistctrlgetnextsibling},
|
|
\helpref{GetLastChild}{wxtreelistctrlgetlastchild}
|
|
|
|
\membersection{wxTreeListCtrl::GetLineSpacing}\label{wxtreelistctrlgetlinespacing}
|
|
|
|
\constfunc{int}{GetLineSpacing}{\void}
|
|
|
|
Returns the space above and below the text on each line.
|
|
|
|
\membersection{wxTreeListCtrl::GetNextChild}\label{wxtreelistctrlgetnextchild}
|
|
|
|
\constfunc{wxTreeItemId}{GetNextChild}{\param{const wxTreeItemId\&}{ item}, \param{long\& }{cookie}}
|
|
|
|
Returns the next child; call \helpref{wxTreeListCtrl::GetFirstChild}{wxtreelistctrlgetfirstchild} for the first child.
|
|
|
|
For this enumeration function you must pass in a `cookie' parameter
|
|
which is opaque for the application but is necessary for the library
|
|
to make these functions reentrant (i.e. allow more than one
|
|
enumeration on one and the same object simultaneously). The cookie passed to
|
|
GetFirstChild and GetNextChild should be the same.
|
|
|
|
Returns an invalid tree item if there are no further children.
|
|
|
|
\wxheading{See also}
|
|
|
|
\helpref{wxTreeListCtrl::GetFirstChild}{wxtreelistctrlgetfirstchild}
|
|
|
|
\pythonnote{In wxPython the returned wxTreeItemId and the new cookie
|
|
value are both returned as a tuple containing the two values.}
|
|
|
|
\perlnote{In wxPerl this method returns a 2-element list
|
|
{\tt ( item, cookie )}, instead of modifying its parameters.}
|
|
|
|
\membersection{wxTreeListCtrl::GetNextSibling}\label{wxtreelistctrlgetnextsibling}
|
|
|
|
\constfunc{wxTreeItemId}{GetNextSibling}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns the next sibling of the specified item; call \helpref{wxTreeListCtrl::GetPrevSibling}{wxtreelistctrlgetprevsibling} for the previous sibling.
|
|
|
|
Returns an invalid tree item if there are no further siblings.
|
|
|
|
\wxheading{See also}
|
|
|
|
\helpref{wxTreeListCtrl::GetPrevSibling}{wxtreelistctrlgetprevsibling}
|
|
|
|
\membersection{wxTreeListCtrl::GetNextVisible}\label{wxtreelistctrlgetnextvisible}
|
|
|
|
\constfunc{wxTreeItemId}{GetNextVisible}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns the next visible item.
|
|
|
|
\membersection{wxTreeListCtrl::GetItemParent}\label{wxtreelistctrlgetitemparent}
|
|
|
|
\constfunc{wxTreeItemId}{GetItemParent}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns the item's parent.
|
|
|
|
\membersection{wxTreeListCtrl::GetPrevSibling}\label{wxtreelistctrlgetprevsibling}
|
|
|
|
\constfunc{wxTreeItemId}{GetPrevSibling}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns the previous sibling of the specified item; call \helpref{wxTreeListCtrl::GetNextSibling}{wxtreelistctrlgetnextsibling} for the next sibling.
|
|
|
|
Returns an invalid tree item if there are no further children.
|
|
|
|
\wxheading{See also}
|
|
|
|
\helpref{wxTreeListCtrl::GetNextSibling}{wxtreelistctrlgetnextsibling}
|
|
|
|
\membersection{wxTreeListCtrl::GetPrevVisible}\label{wxtreelistctrlgetprevvisible}
|
|
|
|
\constfunc{wxTreeItemId}{GetPrevVisible}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns the previous visible item.
|
|
|
|
\membersection{wxTreeListCtrl::GetRootItem}\label{wxtreelistctrlgetrootitem}
|
|
|
|
\constfunc{wxTreeItemId}{GetRootItem}{\void}
|
|
|
|
Returns the root item for the tree list control.
|
|
|
|
\membersection{wxTreeListCtrl::GetSelection}\label{wxtreelistctrlgetselection}
|
|
|
|
\constfunc{wxTreeItemId}{GetSelection}{\void}
|
|
|
|
Returns the selection, or an invalid item if there is no selection.
|
|
This function only works with the controls without wxTR\_MULTIPLE style, use
|
|
\helpref{GetSelections}{wxtreelistctrlgetselections} for the controls which do have
|
|
this style.
|
|
|
|
\membersection{wxTreeListCtrl::GetSelections}\label{wxtreelistctrlgetselections}
|
|
|
|
\constfunc{size\_t}{GetSelections}{\param{wxArrayTreeItemIds\& }{selection}}
|
|
|
|
Fills the array of tree items passed in with the currently selected items. This
|
|
function can be called only if the control has the wxTR\_MULTIPLE style.
|
|
|
|
Returns the number of selected items.
|
|
|
|
\pythonnote{The wxPython version of this method accepts no parameters
|
|
and returns a Python list of {\tt wxTreeItemId}s.}
|
|
|
|
\perlnote{In wxPerl this method takes no parameters and returns a list of
|
|
{\tt Wx::TreeItemId}s.}
|
|
|
|
\membersection{wxTreeListCtrl::GetStateImageList}\label{wxtreelistctrlgetstateimagelist}
|
|
|
|
\constfunc{wxImageList*}{GetStateImageList}{\void}
|
|
|
|
Returns the state image list (from which application-defined state images are taken).
|
|
|
|
\membersection{wxTreeListCtrl::GetWindowStyle}\label{wxtreelistctrlgetwindowstyle}
|
|
|
|
\constfunc{long}{GetWindowStyle}{\void}
|
|
|
|
???
|
|
|
|
\membersection{wxTreeListCtrl::GetWindowStyleFlag}\label{wxtreelistctrlgetwindowstyleflag}
|
|
|
|
\constfunc{long}{GetWindowStyleFlag}{\void}
|
|
|
|
???
|
|
|
|
\membersection{wxTreeListCtrl::HitTest}\label{wxtreelistctrlhittest}
|
|
|
|
\func{wxTreeItemId}{HitTest}{\param{const wxPoint\& }{point}}
|
|
|
|
\func{wxTreeItemId}{HitTest}{\param{const wxPoint\& }{point}, \param{int\& }{flags}}
|
|
|
|
\func{wxTreeItemId}{HitTest}{\param{const wxPoint\& }{point}, \param{int\& }{flags},
|
|
\param{int\& }{column}}
|
|
|
|
Calculates which (if any) item is under the given point, returning the tree item
|
|
id at this point plus extra information {\it flags}. {\it flags} is a bitlist of the following:
|
|
|
|
\twocolwidtha{5cm}
|
|
\begin{twocollist}\itemsep=0pt
|
|
\twocolitem{wxTREE\_HITTEST\_ABOVE}{Above the client area.}
|
|
\twocolitem{wxTREE\_HITTEST\_BELOW}{Below the client area.}
|
|
\twocolitem{wxTREE\_HITTEST\_NOWHERE}{In the client area but below the last item.}
|
|
\twocolitem{wxTREE\_HITTEST\_ONITEMBUTTON}{On the button associated with an item.}
|
|
\twocolitem{wxTREE\_HITTEST\_ONITEMICON}{On the bitmap associated with an item.}
|
|
\twocolitem{wxTREE\_HITTEST\_ONITEMINDENT}{In the indentation associated with an item.}
|
|
\twocolitem{wxTREE\_HITTEST\_ONITEMLABEL}{On the label (string) associated with an item.}
|
|
\twocolitem{wxTREE\_HITTEST\_ONITEMRIGHT}{In the area to the right of an item.}
|
|
\twocolitem{wxTREE\_HITTEST\_ONITEMSTATEICON}{On the state icon for a tree view item that is in a user-defined state.}
|
|
\twocolitem{wxTREE\_HITTEST\_TOLEFT}{To the right of the client area.}
|
|
\twocolitem{wxTREE\_HITTEST\_TORIGHT}{To the left of the client area.}
|
|
\end{twocollist}
|
|
|
|
\pythonnote{in wxPython both the wxTreeItemId and the flags are
|
|
returned as a tuple.}
|
|
|
|
\perlnote{In wxPerl this method only takes the {\tt point} parameter
|
|
and returns a 2-element list {\tt ( item, flags )}.}
|
|
|
|
\membersection{wxTreeListCtrl::InsertItem}\label{wxtreelistctrlinsertitem}
|
|
|
|
\func{wxTreeItemId}{InsertItem}{\param{const wxTreeItemId\& }{parent}, \param{const wxTreeItemId\& }{previous}, \param{const wxString\&}{ text},
|
|
\param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = NULL}}
|
|
|
|
\func{wxTreeItemId}{InsertItem}{\param{const wxTreeItemId\& }{parent}, \param{size\_t}{ before}, \param{const wxString\&}{ text},
|
|
\param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = NULL}}
|
|
|
|
Inserts an item after a given one ({\it previous}) or before one identified by its position ({\it before}).
|
|
{\it before} must be less than the number of children.
|
|
|
|
The {\it image} and {\it selImage} parameters are an index within
|
|
the normal image list specifying the image to use for unselected and
|
|
selected items, respectively.
|
|
If {\it image} > -1 and {\it selImage} is -1, the same image is used for
|
|
both selected and unselected items.
|
|
|
|
\pythonnote{The second form of this method is called
|
|
{\tt InsertItemBefore} in wxPython.}
|
|
|
|
\membersection{wxTreeListCtrl::IsBold}\label{wxtreelistctrlisbold}
|
|
|
|
\constfunc{bool}{IsBold}{\param{const wxTreeItemId\& }{item}}
|
|
|
|
Returns TRUE if the given item is in bold state.
|
|
|
|
See also: \helpref{SetItemBold}{wxtreelistctrlsetitembold}
|
|
|
|
\membersection{wxTreeListCtrl::IsExpanded}\label{wxtreelistctrlisexpanded}
|
|
|
|
\constfunc{bool}{IsExpanded}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns TRUE if the item is expanded (only makes sense if it has children).
|
|
|
|
\membersection{wxTreeListCtrl::IsSelected}\label{wxtreelistctrlisselected}
|
|
|
|
\constfunc{bool}{IsSelected}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns TRUE if the item is selected.
|
|
|
|
\membersection{wxTreeListCtrl::IsVisible}\label{wxtreelistctrlisvisible}
|
|
|
|
\constfunc{bool}{IsVisible}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns TRUE if the item is visible (it might be outside the view, or not expanded).
|
|
|
|
\membersection{wxTreeListCtrl::HasChildren}\label{wxtreelistctrlhaschildren}
|
|
|
|
\constfunc{bool}{HasChildren}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns TRUE if the item has children.???
|
|
|
|
\membersection{wxTreeListCtrl::ItemHasChildren}\label{wxtreelistctrlitemhaschildren}
|
|
|
|
\constfunc{bool}{ItemHasChildren}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns TRUE if the item has children.
|
|
|
|
\membersection{wxTreeListCtrl::OnCompareItems}\label{wxtreelistctrloncompareitems}
|
|
|
|
\func{int}{OnCompareItems}{\param{const wxTreeItemId\& }{item1}, \param{const wxTreeItemId\& }{item2}}
|
|
|
|
Override this function in the derived class to change the sort order of the
|
|
items in the tree list control. The function should return a negative, zero or
|
|
positive value if the first item is less than, equal to or greater than the
|
|
second one.
|
|
|
|
The base class version compares items alphabetically.
|
|
|
|
See also: \helpref{SortChildren}{wxtreelistctrlsortchildren}
|
|
|
|
\membersection{wxTreeListCtrl::PrependItem}\label{wxtreelistctrlprependitem}
|
|
|
|
\func{wxTreeItemId}{PrependItem}{\param{const wxTreeItemId\& }{parent}, \param{const wxString\&}{ text},
|
|
\param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = NULL}}
|
|
|
|
Appends an item as the first child of {\it parent}, return a new item id.
|
|
|
|
The {\it image} and {\it selImage} parameters are an index within
|
|
the normal image list specifying the image to use for unselected and
|
|
selected items, respectively.
|
|
If {\it image} > -1 and {\it selImage} is -1, the same image is used for
|
|
both selected and unselected items.
|
|
|
|
\membersection{wxTreeListCtrl::Refresh}\label{wxtreelistctrlrefresh}
|
|
|
|
\func{bool}{Refresh}{\param{bool}{ erase=TRUE}, \param{wxRect*}{ rect=NULL}}
|
|
|
|
Description???
|
|
|
|
Parameter???
|
|
|
|
\membersection{wxTreeListCtrl::SetBackgroundColour}\label{wxtreelistctrlsetbackgroundcolour}
|
|
|
|
\func{void}{SetBackgroundColour}{\param{const wxColour\&}{ colour}}
|
|
|
|
???
|
|
|
|
\membersection{wxTreeListCtrl::SetFocus}\label{wxtreelistctrlsetfocus}
|
|
|
|
\func{void}{SetFocus}{\void}
|
|
|
|
???
|
|
|
|
\membersection{wxTreeListCtrl::SetFont}\label{wxtreelistctrlsetfont}
|
|
|
|
\func{void}{SetFont}{\param{const wxFont\&}{ font}}
|
|
|
|
???
|
|
|
|
\membersection{wxTreeListCtrl::SetForegroundColour}\label{wxtreelistctrlsetforegroundcolour}
|
|
|
|
\func{void}{SetForegroundColour}{\param{const wxColour\&}{ colour}}
|
|
|
|
???
|
|
|
|
\membersection{wxTreeListCtrl::SetWindowStyle}\label{wxtreelistctrlsetwindowstyle}
|
|
|
|
\func{void}{SetWindowStyle}{\param{const long}{ styles}}
|
|
|
|
???
|
|
|
|
\membersection{wxTreeListCtrl::ScrollTo}\label{wxtreelistctrlscrollto}
|
|
|
|
\func{void}{ScrollTo}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Scrolls the specified item into view.
|
|
|
|
\membersection{wxTreeListCtrl::SelectItem}\label{wxtreelistctrlselectitem}
|
|
|
|
\func{bool}{SelectItem}{\param{const wxTreeItemId\&}{ item}, \param{bool}{ unselect_others=TRUE},
|
|
\param{bool}{ extended_select=FALSE}}
|
|
|
|
Selects the given item.
|
|
|
|
Parameter???
|
|
|
|
\membersection{wxTreeListCtrl::SetButtonsImageList}\label{wxtreelistctrlsetbuttonsimagelist}
|
|
|
|
\func{void}{SetButtonsImageList}{\param{wxImageList*}{ imageList}}
|
|
|
|
Sets the buttons image list (from which application-defined button images are taken).
|
|
The button images assigned with this method will
|
|
{\bf not} be deleted by wxTreeListCtrl's destructor, you must delete it yourself.
|
|
|
|
Setting or assigning the button image list enables the display of image buttons.
|
|
Once enabled, the only way to disable the display of button images is to set
|
|
the button image list to NULL.
|
|
|
|
This function is only available in the generic version.
|
|
|
|
See also \helpref{AssignButtonsImageList}{wxtreelistctrlassignbuttonsimagelist}.
|
|
|
|
\membersection{wxTreeListCtrl::SetImageList}\label{wxtreelistctrlsetimagelist}
|
|
|
|
\func{void}{SetImageList}{\param{wxImageList*}{ imageList}}
|
|
|
|
Sets the normal image list. Image list assigned with this method will
|
|
{\bf not} be deleted by wxTreeListCtrl's destructor, you must delete it yourself.
|
|
|
|
See also \helpref{AssignImageList}{wxtreelistctrlassignimagelist}.
|
|
|
|
\membersection{wxTreeListCtrl::SetIndent}\label{wxtreelistctrlsetindent}
|
|
|
|
\func{void}{SetIndent}{\param{int}{ indent}}
|
|
|
|
Sets the indentation for the tree list control.
|
|
|
|
\membersection{wxTreeListCtrl::SetItemBackgroundColour}\label{wxtreelistctrlsetitembackgroundcolour}
|
|
|
|
\func{void}{SetItemBackgroundColour}{\param{const wxTreeItemId\&}{ item}, \param{const wxColour\& }{colour}}
|
|
|
|
Sets the colour of the item's background.
|
|
|
|
\membersection{wxTreeListCtrl::SetItemBold}\label{wxtreelistctrlsetitembold}
|
|
|
|
\func{void}{SetItemBold}{\param{const wxTreeItemId\& }{item}, \param{bool}{ bold = TRUE}}
|
|
|
|
Makes item appear in bold font if {\it bold} parameter is TRUE or resets it to
|
|
the normal state.
|
|
|
|
See also: \helpref{IsBold}{wxtreelistctrlisbold}
|
|
|
|
\membersection{wxTreeListCtrl::SetItemData}\label{wxtreelistctrlsetitemdata}
|
|
|
|
\func{void}{SetItemData}{\param{const wxTreeItemId\&}{ item}, \param{wxTreeItemData* }{data}}
|
|
|
|
Sets the item client data.
|
|
|
|
\pythonnote{wxPython provides the following shortcut method:\par
|
|
\indented{2cm}{\begin{twocollist}\itemsep=0pt
|
|
\twocolitem{{\bf SetPyData(item, obj)}}{Associate the given Python
|
|
Object with the wxTreeItemData for the given item Id.}
|
|
\end{twocollist}}
|
|
}
|
|
|
|
\perlnote{wxPerl provides the following shortcut method:
|
|
\indented{2cm}{
|
|
\begin{twocollist}\itemsep=0pt
|
|
\twocolitem{{\bf SetPlData( item, data )}}{Sets the Perl data
|
|
associated with the Wx::TreeItemData ( it is just the same as
|
|
tree->GetItemData( item )->SetData( data ); ).}
|
|
\end{twocollist}}
|
|
}
|
|
|
|
\membersection{wxTreeListCtrl::SetItemFont}\label{wxtreelistctrlsetitemfont}
|
|
|
|
\func{void}{SetItemFont}{\param{const wxTreeItemId\&}{ item}, \param{const wxFont\& }{font}}
|
|
|
|
Sets the item's font. All items in the tree should have the same height to avoid
|
|
text clipping, so the fonts height should be the same for all of them,
|
|
although font attributes may vary.
|
|
|
|
\wxheading{See also}
|
|
|
|
\helpref{SetItemBold}{wxtreelistctrlsetitembold}
|
|
|
|
\membersection{wxTreeListCtrl::SetItemHasChildren}\label{wxtreelistctrlsetitemhaschildren}
|
|
|
|
\func{void}{SetItemHasChildren}{\param{const wxTreeItemId\&}{ item}, \param{bool}{ has = TRUE}}
|
|
|
|
Force appearance of the button next to the item. This is useful to
|
|
allow the user to expand the items which don't have any children now,
|
|
but instead adding them only when needed, thus minimizing memory
|
|
usage and loading time.
|
|
|
|
\membersection{wxTreeListCtrl::SetItemImage}\label{wxtreelistctrlsetitemimage}
|
|
|
|
\func{void}{SetItemImage}{\param{const wxTreeItemId\&}{ item}, \param{int}{ image},
|
|
\param{wxTreeItemIcon}{ which = wxTreeItemIcon_Normal}}
|
|
|
|
Sets the specified item image of the main column. See \helpref{GetItemImage}{wxtreelistctrlgetitemimage}
|
|
for the description of the {\it which} parameter.
|
|
|
|
\func{void}{SetItemImage}{\param{const wxTreeItemId\&}{ item}, \param{size_t}{ column}, \param{int}{ image},
|
|
\param{wxTreeItemIcon}{ which = wxTreeItemIcon_Normal}}
|
|
|
|
Sets the specified item image of the entered column. See \helpref{GetItemImage}{wxtreelistctrlgetitemimage}
|
|
for the description of the {\it which} parameter.
|
|
|
|
\membersection{wxTreeListCtrl::SetItemText}\label{wxtreelistctrlsetitemtext}
|
|
|
|
\func{void}{SetItemText}{\param{const wxTreeItemId\&}{ item}, \param{const wxString\&}{ text}}
|
|
|
|
Sets the item text of the main column.
|
|
|
|
\func{void}{SetItemText}{\param{const wxTreeItemId\&}{ item}, \param{size_t}{ column}, \param{const wxString\&}{ text}}
|
|
|
|
Sets the item text of the entered column.
|
|
|
|
\membersection{wxTreeListCtrl::SetItemTextColour}\label{wxtreelistctrlsetitemtextcolour}
|
|
|
|
\func{void}{SetItemTextColour}{\param{const wxTreeItemId\&}{ item}, \param{const wxColour\&}{ colour}}
|
|
|
|
Sets the colour of the item's text.
|
|
|
|
\membersection{wxTreeListCtrl::SetLineSpacing}\label{wxtreelistctrlsetindent}
|
|
|
|
\func{void}{SetLineSpacing}{\param{unsigned int}{ spacing}}
|
|
|
|
Sets the space above and below the text on each line.
|
|
|
|
\membersection{wxTreeListCtrl::SetStateImageList}\label{wxtreelistctrlsetstateimagelist}
|
|
|
|
\func{void}{SetStateImageList}{\param{wxImageList*}{ imageList}}
|
|
|
|
Sets the state image list (from which application-defined state images are taken).
|
|
Image list assigned with this method will
|
|
{\bf not} be deleted by wxTreeListCtrl's destructor, you must delete it yourself.
|
|
|
|
See also \helpref{AssignStateImageList}{wxtreelistctrlassignstateimagelist}.
|
|
|
|
\func{void}{SetWindowStyle}{\param{long}{styles}}
|
|
|
|
Sets the mode flags associated with the display of the tree list control.
|
|
The new mode takes effect immediately.
|
|
(Generic only; MSW ignores changes.)
|
|
|
|
\membersection{wxTreeListCtrl::SortChildren}\label{wxtreelistctrlsortchildren}
|
|
|
|
\func{void}{SortChildren}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Sorts the children of the given item using
|
|
\helpref{OnCompareItems}{wxtreelistctrloncompareitems} method of wxTreeListCtrl. You
|
|
should override that method to change the sort order (the default is ascending
|
|
case-sensitive alphabetical order).
|
|
|
|
\wxheading{See also}
|
|
|
|
wxTreeItemData, \helpref{OnCompareItems}{wxtreelistctrloncompareitems}
|
|
|
|
\membersection{wxTreeListCtrl::Toggle}\label{wxtreelistctrltoggle}
|
|
|
|
\func{void}{Toggle}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Toggles the given item between collapsed and expanded states.
|
|
|
|
\membersection{wxTreeListCtrl::Unselect}\label{wxtreelistctrlunselect}
|
|
|
|
\func{void}{Unselect}{\void}
|
|
|
|
Removes the selection from the currently selected item (if any).
|
|
|
|
\membersection{wxTreeListCtrl::UnselectAll}\label{wxtreelistctrlunselectall}
|
|
|
|
\func{void}{UnselectAll}{\void}
|
|
|
|
This function either behaves the same as \helpref{Unselect}{wxtreelistctrlunselect}
|
|
if the control doesn't have wxTR\_MULTIPLE style, or removes the selection from
|
|
all items if it does have this style.
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members (column specific}}}
|
|
|
|
\membersection{wxTreeListCtrl::AddColumn}\label{wxtreelistctrladdcolumn}
|
|
|
|
\func{void}{AddColumn}{\param{const wxString\&}{ text}}
|
|
|
|
\func{void}{AddColumn}{\param{const wxString\&}{ text}, \param{size_t}{ width}, \param{wxTreeListColumnAlign}{ alignment = wxTL_ALIGN_LEFT}}
|
|
|
|
\func{void}{AddColumn}{\param{const wxTreeListColumnInfo\&}{ col}}
|
|
|
|
Adds a column.
|
|
|
|
\membersection{wxTreeListCtrl::GetColumn}\label{wxtreelistctrlgetcolumn}
|
|
|
|
\func{wxTreeListColumnInfo\&}{GetColumn}{\param{size_t}{ column}}
|
|
|
|
\constfunc{wxTreeListColumnInfo\&}{GetColumn}{\param{size_t}{ column}}
|
|
|
|
Returns the infos of the columns.
|
|
|
|
\membersection{wxTreeListCtrl::GetColumnAlignment}\label{wxtreelistctrlgetcolumnalignment}
|
|
|
|
\constfunc{wxTreeListColumnAlign}{GetColumnAlignment}{\param{size_t}{ column}}
|
|
|
|
Returns the alignment of the columns.
|
|
|
|
\membersection{wxTreeListCtrl::GetColumnCount}\label{wxtreelistctrlgetcolumncount}
|
|
|
|
\constfunc{size_t}{GetColumnCount}{\void}
|
|
|
|
Returns the number of columns.
|
|
|
|
\membersection{wxTreeListCtrl::GetColumnImage}\label{wxtreelistctrlgetcolumnimage}
|
|
|
|
\constfunc{int}{GetColumnImage}{\param{size_t}{ column}}
|
|
|
|
Returns the image of the columns.
|
|
|
|
\membersection{wxTreeListCtrl::GetColumnText}\label{wxtreelistctrlgetcolumntext}
|
|
|
|
\constfunc{wxString}{GetColumnText}{\param{size_t}{ column}}
|
|
|
|
Returns the text of the columns.
|
|
|
|
\membersection{wxTreeListCtrl::GetColumnWidth}\label{wxtreelistctrlgetcolumnwidth}
|
|
|
|
\constfunc{size_t}{GetColumnWidth}{\param{size_t}{ column}}
|
|
|
|
Returns the width of the columns.
|
|
|
|
\membersection{wxTreeListCtrl::GetMainColumn}\label{wxtreelistctrlgetmaincolumn}
|
|
|
|
\constfunc{size_t}{GetMainColumn}{\void}
|
|
|
|
Returns the number of the main column.
|
|
|
|
\membersection{wxTreeListCtrl::InsertColumn}\label{wxtreelistctrlinsertcolumn}
|
|
|
|
\func{void}{InsertColumn}{\param{size_t}{ before}, \param{const wxString\&}{ text}}
|
|
|
|
\func{void}{InsertColumn}{\param{size_t}{ before}, \param{const wxString\&}{ text}, \param{size_t}{ width},
|
|
\param{wxTreeListColumnAlign}{ alignment = wxTL_ALIGN_LEFT}}
|
|
|
|
Inserts a column before(???) the entered column.
|
|
|
|
\membersection{wxTreeListCtrl::IsColumnShown}\label{wxtreelistctrliscolumnshown}
|
|
|
|
\constfunc{bool}{IsColumnShown}{\param{size_t}{ column}}
|
|
|
|
Returns if the columns is shown.
|
|
|
|
\membersection{wxTreeListCtrl::RemoveColumn}\label{wxtreelistctrlremovecolumn}
|
|
|
|
\func{void}{RemoveColumn}{\param{size_t}{ column}}
|
|
|
|
Removes the entered column.
|
|
|
|
\membersection{wxTreeListCtrl::SetColumn}\label{wxtreelistctrlsetcolumn}
|
|
|
|
\func{void}{SetColumn}{\param{size_t}{ column}, \param{const wxTreeListColumnInfo\&}{ info}}
|
|
|
|
Sets the infos of the column.
|
|
|
|
\membersection{wxTreeListCtrl::SetColumnAlignment}\label{wxtreelistctrlsetcolumnalignment}
|
|
|
|
\func{void}{SetColumnAlignment}{\param{size_t}{ column}, \param{const wxTreeListColumnAlign}{ align}}
|
|
|
|
Sets the alignment of the column.
|
|
|
|
\membersection{wxTreeListCtrl::SetColumnImage}\label{wxtreelistctrlsetcolumnimage}
|
|
|
|
\func{void}{SetColumnImage}{\param{size_t}{ column}, \param{int}{ image}}
|
|
|
|
Sets the image of the column.
|
|
|
|
\membersection{wxTreeListCtrl::SetColumnText}\label{wxtreelistctrlsetcolumntext}
|
|
|
|
\func{void}{SetColumnText}{\param{size_t}{ column}, \param{const wxString\&}{ text}}
|
|
|
|
Sets the text of the column.
|
|
|
|
\membersection{wxTreeListCtrl::SetColumnWidth}\label{wxtreelistctrlsetcolumnwidth}
|
|
|
|
\func{void}{SetColumnWidth}{\param{size_t}{ column}, \param{size_t}{ width}}
|
|
|
|
Sets the width of the column.
|
|
|
|
\membersection{wxTreeListCtrl::SetMainColumn}\label{wxtreelistctrlsetmaincolumn}
|
|
|
|
\func{void}{SetMainColumn}{\param{size_t}{ column}}
|
|
|
|
Set the main column.
|
|
|
|
\membersection{wxTreeListCtrl::ShowColumn}\label{wxtreelistctrlshowcolumn}
|
|
|
|
\func{void}{ShowColumn}{\param{size_t}{ column}, \param{bool}{ shown}}
|
|
|
|
Shows/hides the column.
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members (item specific}}}
|
|
|
|
\membersection{wxTreeListCtrl::GetItemBold}\label{wxtreelistctrlgetitembold}
|
|
|
|
\constfunc{bool}{GetItemBold}{\param{const wxTreeItemId\&}{ item}}
|
|
|
|
Returns the item bold status.
|
|
|