added discussion of user-generated vs programmatic events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -219,6 +219,31 @@ used by, the native controls in a dialog. In this case, a special event handler
|
||||
will have to be written that will override ProcessEvent() in order to pass
|
||||
all events (or any selection of them) to the parent window.
|
||||
|
||||
|
||||
\subsection{Events generated by the user vs programmatically generated events}\label{progevent}
|
||||
|
||||
While generically \helpref{wxEvents}{wxevent} can be generated both by user
|
||||
actions (e.g. resize of a \helpref{wxWindow}{wxwindow}) and by calls to functions
|
||||
(e.g. \helpref{wxWindow::SetSize}{wxwindowsetsize}), wxWidgets controls
|
||||
normally send \helpref{wxCommandEvent}{wxcommandevent}-derived events only for
|
||||
the user-generated events. The only {\bf exceptions} to this rule are:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxNotebook::AddPage}{wxnotebookaddpage}}{No event-free alternatives}
|
||||
\twocolitem{\helpref{wxNotebook::AdvanceSelection}{wxnotebookadvanceselection}}{No event-free alternatives}
|
||||
\twocolitem{\helpref{wxNotebook::DeletePage}{wxnotebookdeletepage}}{No event-free alternatives}
|
||||
\twocolitem{\helpref{wxNotebook::SetSelection}{wxnotebooksetselection}}{Use \helpref{wxNotebook::ChangeSelection}{wxnotebookchangeselection} instead, as \helpref{wxNotebook::SetSelection}{wxnotebooksetselection} is deprecated}
|
||||
\twocolitem{\helpref{wxTreeCtrl::Delete}{wxtreectrldelete}}{No event-free alternatives}
|
||||
\twocolitem{\helpref{wxTreeCtrl::DeleteAllItems}{wxtreectrldeleteallitems}}{No event-free alternatives}
|
||||
\twocolitem{\helpref{wxTreeCtrl::EditLabel}{wxtreectrleditlabel}}{No event-free alternatives}
|
||||
\twocolitem{All \helpref{wxTextCtrl}{wxtextctrl} methods}
|
||||
{\helpref{wxTextCtrl::ChangeValue}{wxtextctrlchangevalue} can be used instead
|
||||
of \helpref{wxTextCtrl::SetValue}{wxtextctrlsetvalue} but the other functions,
|
||||
such as \helpref{Replace}{wxtextctrlreplace} or \helpref{WriteText}{wxtextctrlwritetext}
|
||||
don't have event-free equivalents}
|
||||
\end{twocollist}
|
||||
|
||||
|
||||
% VZ: it doesn't work like this, but just in case we ever reenable this
|
||||
% behaviour, I leave it here
|
||||
%
|
||||
|
Reference in New Issue
Block a user