expanded to show further items. Items in a tree control are referenced by
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
as well is wxDataViewTreeCtrl.
@endStyleTable
See also @ref overview_windowstyles.
-
+
@b Win32 @b notes:
wxTreeCtrl class uses the standard common treeview control under Win32
long style = wxTR_HAS_BUTTONS,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "treeCtrl");
-
+
/**
Destructor, destroying the tree control.
/**
Appends an item to the end of the branch identified by @a parent, return
a new item id.
-
+
The @a image and @a selImage parameters are an index within the normal
image list specifying the image to use for unselected and selected
items, respectively. If @a image -1 and @a selImage is -1, the same
*/
int GetItemSelectedImage(const wxTreeItemId& item) const;
+ /**
+ Gets the specified item state.
+ */
+ int GetItemState(const wxTreeItemId& item) const;
+
/**
Returns the item label.
*/
wxTR_MULTIPLE style.
Returns the number of selected items.
-
+
@beginWxPythonOnly
The wxPython version of this method accepts no parameters and returns a
Python list of @ref wxTreeItemId "wxTreeItemId"s.
item that is in a user-defined state.
- @c wxTREE_HITTEST_TOLEFT: To the right of the client area.
- @c wxTREE_HITTEST_TORIGHT: To the left of the client area.
-
+
@beginWxPythonOnly
In wxPython both the wxTreeItemId and the flags are returned as a tuple.
@endWxPythonOnly
*/
void SetItemSelectedImage(const wxTreeItemId& item, int selImage);
+ /**
+ Sets the specified item state. The value of @a state may be:
+ - wxTREE_ITEMSTATE_NONE: to disable the item state (the state image will
+ be not displayed).
+ - wxTREE_ITEMSTATE_NEXT: to set the next item state.
+ - wxTREE_ITEMSTATE_PREV: to set the previous item statem.
+ */
+ void SetItemState(const wxTreeItemId& item, int state);
+
/**
Sets the item label.
*/
*/
void SetToolTip(const wxString& tooltip);
};
-