Improve documentation of events sent by wxTreeCtrl::EditLabel()
Make it clear that wxEVT_TREE_END_LABEL_EDIT is sent whether the user accepts or cancels editing the label. Closes #22867.
This commit is contained in:
parent
f7b2036a92
commit
6e940d1a10
1 changed files with 16 additions and 6 deletions
|
|
@ -349,13 +349,23 @@ public:
|
|||
virtual void DeleteChildren(const wxTreeItemId& item);
|
||||
|
||||
/**
|
||||
Starts editing the label of the given @a item. This function generates a
|
||||
@c EVT_TREE_BEGIN_LABEL_EDIT event which can be vetoed so that no text
|
||||
control will appear for in-place editing.
|
||||
Starts editing the label of the given @a item.
|
||||
|
||||
If the user changed the label (i.e. s/he does not press ESC or leave the
|
||||
text control without changes, a @c EVT_TREE_END_LABEL_EDIT event will be
|
||||
sent which can be vetoed as well.
|
||||
This function generates a @c EVT_TREE_BEGIN_LABEL_EDIT event which can
|
||||
be vetoed to prevent the editing from starting.
|
||||
|
||||
If it does start, a text control, which can be retrieved using
|
||||
GetEditControl(), allowing the user to edit the label interactively is
|
||||
shown. In wxMSW, this text control is created using @a textCtrlClass,
|
||||
however this parameter is currently ignored in the other ports where a
|
||||
plain wxTextCtrl is always used.
|
||||
|
||||
When the editing ends, @c EVT_TREE_END_LABEL_EDIT event is sent and
|
||||
this event can be vetoed as well to prevent the label from changing.
|
||||
Note that this event is sent both when the user accepts (e.g. by
|
||||
pressing Enter) or cancels (e.g. by pressing Escape) and its handler
|
||||
can use wxTreeEvent::IsEditCancelled() to distinguish between these
|
||||
situations.
|
||||
|
||||
@see EndEditLabel(), wxTreeEvent
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue