diff --git a/docs/latex/wx/notifevt.tex b/docs/latex/wx/notifevt.tex index c68b7eca8b..61a78552da 100644 --- a/docs/latex/wx/notifevt.tex +++ b/docs/latex/wx/notifevt.tex @@ -7,6 +7,14 @@ It (or an object of a derived class) is sent when the controls state is being changed and allows the program to \helpref{Veto()}{wxnotifyeventveto} this change if it wants to prevent it from happening. +In some rare cases (so far only dragging the items in the tree control) the +event is disabled by default in which case +\helpref{Allow()}{wxnotifyeventallow} may be called to allow it. + +If both \helpref{Allow()}{wxnotifyeventallow} and +\helpref{Veto()}{wxnotifyeventveto} are called, only the last method called +counts. + \wxheading{Derived from} \helpref{wxCommandEvent}{wxcommandevent}\\ @@ -34,6 +42,12 @@ None Constructor (used internally by wxWindows only). +\membersection{wxNotifyEvent::Allow}\label{wxnotifyeventallow} + +\func{void}{Allow}{\param{bool }{allow = TRUE}} + +Allow the action signalled by this event to be carried. + \membersection{wxNotifyEvent::IsAllowed}\label{wxnotifyeventisallowed} \constfunc{bool}{IsAllowed}{\void} diff --git a/docs/latex/wx/treectrl.tex b/docs/latex/wx/treectrl.tex index 0bd2bdc467..f0f7f5511f 100644 --- a/docs/latex/wx/treectrl.tex +++ b/docs/latex/wx/treectrl.tex @@ -40,6 +40,7 @@ functions that take a \helpref{wxTreeEvent}{wxtreeevent} argument. \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\_END\_DRAG(id, func)}}{Drag ended (drop).} \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.} @@ -55,6 +56,12 @@ functions that take a \helpref{wxTreeEvent}{wxtreeevent} argument. \twocolitem{{\bf EVT\_TREE\_KEY\_DOWN(id, func)}}{A key has been pressed.} \end{twocollist}% +Note that to allow drag and drop in the tree control you must explicitly call +\helpref{Allow()}{wxnotifyeventallow} in the event handler, by default +dragging is disabled. On the other hand, label editing is allowed by default +for the controls with \windowstyle{wxTR\_EDIT\_LABELS} style but you can call +\helpref{Veto()}{wxnotifyeventveto} to prevent it from happening. + \wxheading{See also} \helpref{wxTreeItemData}{wxtreeitemdata}, \helpref{wxTreeCtrl overview}{wxtreectrloverview}, \helpref{wxListBox}{wxlistbox}, \helpref{wxListCtrl}{wxlistctrl},\rtfsp diff --git a/docs/latex/wx/treeevt.tex b/docs/latex/wx/treeevt.tex index 4338aa64ca..51083f0ed7 100644 --- a/docs/latex/wx/treeevt.tex +++ b/docs/latex/wx/treeevt.tex @@ -22,6 +22,7 @@ functions that take a wxTreeEvent argument. \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\_END\_DRAG(id, func)}}{Drag ended (drop).} \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.}