@library{wxcore}
@category{ctrl}
- @appearance{treectrl.png}
+ @appearance{treectrl}
@see wxDataViewTreeCtrl, wxTreeEvent, wxTreeItemData, @ref overview_treectrl,
wxListBox, wxListCtrl, wxImageList
virtual wxTextCtrl *EditLabel(const wxTreeItemId& item,
wxClassInfo* textCtrlClass = wxCLASSINFO(wxTextCtrl));
+ /**
+ Enable or disable a beep if there is no match for the currently
+ entered text when searching for the item from keyboard.
+
+ The default is to not beep in this case except in wxMSW where the
+ beep is always generated by the native control and cannot be disabled,
+ i.e. calls to this function do nothing there.
+
+ @since 2.9.5
+ */
+ void EnableBellOnNoMatch(bool on = true);
+
/**
Ends label editing. If @a cancelEdit is @true, the edit will be
cancelled.
So, for example, the x coordinate may be negative if the tree has a
horizontal scrollbar and its position is not 0.
- @beginWxPythonOnly
- The wxPython version of this method requires only the @a item and @a
- textOnly parameters. The return value is either a wxRect object or @c
- None.
- @endWxPythonOnly
-
@beginWxPerlOnly
In wxPerl this method only takes the @a item and
@a textOnly parameters and returns a @c Wx::Rect (or @c undef).
Returns an invalid tree item (i.e. wxTreeItemId::IsOk() returns @false)
if there are no further children.
- @beginWxPythonOnly
- In wxPython the returned wxTreeItemId and the new cookie value are both
- returned as a tuple containing the two values.
- @endWxPythonOnly
-
@beginWxPerlOnly
In wxPerl this method only takes the @a item parameter, and
returns a 2-element list (item, cookie).
@see wxTreeItemData
- @beginWxPythonOnly
- wxPython provides the following shortcut method:
- @li GetPyData(item): Returns the Python Object associated with the
- wxTreeItemData for the given item Id.
- @endWxPythonOnly
-
@beginWxPerlOnly
wxPerl provides the following shortcut method:
- GetPlData(item): returns the Perl data
Returns an invalid tree item if there are no further children.
- @beginWxPythonOnly
- In wxPython the returned wxTreeItemId and the new cookie value are both
- returned as a tuple containing the two values.
- @endWxPythonOnly
-
@beginWxPerlOnly
In wxPerl this method returns a 2-element list
(item, cookie) instead of modifying its parameters.
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.
- @endWxPythonOnly
-
@beginWxPerlOnly
In wxPerl this method takes no parameters and returns a list of
@c Wx::TreeItemId.
- @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
-
@beginWxPerlOnly
In wxPerl this method only takes the @a point parameter
and returns a 2-element list (item, flags).
/**
Inserts an item before one identified
- by its position (@a before). @a before must be less than the number of
- children.
+ by its position (@a pos). @a pos must be less than or equal to
+ the number of children.
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
image is used for both selected and unselected items.
-
- @beginWxPythonOnly
- In wxPython, this form of this method is called @c InsertItemBefore().
- @endWxPythonOnly
*/
wxTreeItemId InsertItem(const wxTreeItemId& parent,
- size_t before,
+ size_t pos,
const wxString& text,
int image = -1,
int selImage = -1,
multiple times for the same item will result in memory leaks unless you
delete the old item data pointer yourself.
- @beginWxPythonOnly
- - @b SetPyData( @a item, @c obj): Associate the given Python Object with
- the wxTreeItemData for the given item Id.
- @endWxPythonOnly
-
@beginWxPerlOnly
wxPerl provides the following shortcut method:
- SetPlData(item, data): sets the Perl data
The state image has been clicked.
@endEventTable
- @library{wxbase}
+ @library{wxcore}
@category{events}
@see wxTreeCtrl