wxTreeItemId handles, which may be tested for validity by calling
wxTreeItemId::IsOk().
- A similar control with a fully native implemtation for GTK+ and OS X
+ A similar control with a fully native implementation for GTK+ and OS X
as well is wxDataViewTreeCtrl.
To intercept events from a tree control, use the event table macros
For convenience to document that no buttons are to be drawn.
@style{wxTR_HAS_BUTTONS}
Use this style to show + and - buttons to the left of parent items.
+ @style{wxTR_TWIST_BUTTONS}
+ Selects alternative style of @c +/@c - buttons and shows rotating
+ ("twisting") arrows instead. Currently this style is only implemented
+ under Microsoft Windows Vista and later Windows versions and is ignored
+ under the other platforms. Notice that under Vista this style results
+ in the same appearance as used by the tree control in Explorer and
+ other built-in programs and so using it may be preferable to the
+ default style.
@style{wxTR_NO_LINES}
Use this style to hide vertical level connectors.
@style{wxTR_FULL_ROW_HIGHLIGHT}
@event{EVT_TREE_BEGIN_DRAG(id, func)}
Begin dragging with the left mouse button.
If you want to enable left-dragging you need to intercept this event
- and explicitely call wxTreeEvent::Allow(), as it's vetoed by default.
+ and explicitly call wxTreeEvent::Allow(), as it's vetoed by default.
Processes a @c wxEVT_COMMAND_TREE_BEGIN_DRAG event type.
@event{EVT_TREE_BEGIN_RDRAG(id, func)}
Begin dragging with the right mouse button.
If you want to enable right-dragging you need to intercept this event
- and explicitely call wxTreeEvent::Allow(), as it's vetoed by default.
+ and explicitly call wxTreeEvent::Allow(), as it's vetoed by default.
Processes a @c wxEVT_COMMAND_TREE_BEGIN_RDRAG event type.
@event{EVT_TREE_END_DRAG(id, func)}
End dragging with the left or right mouse button.
virtual void ScrollTo(const wxTreeItemId& item);
/**
- Selects the given item. In multiple selection controls, can be also used
- to deselect a currently selected item if the value of @a select is
- @false.
+ Selects the given item.
+
+ In multiple selection controls, can be also used to deselect a
+ currently selected item if the value of @a select is @false.
+
+ Notice that calling this method will generate
+ @c wxEVT_COMMAND_TREE_SEL_CHANGING and @c wxEVT_COMMAND_TREE_SEL_CHANGED
+ events and that the change could be vetoed by the former event handler.
*/
virtual void SelectItem(const wxTreeItemId& item, bool select = true);
@beginEventTable{wxTreeEvent}
@event{EVT_TREE_BEGIN_DRAG(id, func)}
Begin dragging with the left mouse button. If you want to enable
- left-dragging you need to intercept this event and explicitely call
+ left-dragging you need to intercept this event and explicitly call
wxTreeEvent::Allow(), as it's vetoed by default. Also notice that the
control must have an associated image list (see SetImageList()) to
drag its items under MSW.
@event{EVT_TREE_BEGIN_RDRAG(id, func)}
Begin dragging with the right mouse button. If you want to enable
- right-dragging you need to intercept this event and explicitely call
+ right-dragging you need to intercept this event and explicitly call
wxTreeEvent::Allow(), as it's vetoed by default.
@event{EVT_TREE_END_DRAG(id, func)}
End dragging with the left or right mouse button.