X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c57e33394ca152e6e13f10363b76aef6e74a4705..4c7852186d48a5b8f406462c2c3fa020f0a052bb:/docs/latex/wx/text.tex?ds=sidebyside diff --git a/docs/latex/wx/text.tex b/docs/latex/wx/text.tex index 2d5697d970..724f33a98c 100644 --- a/docs/latex/wx/text.tex +++ b/docs/latex/wx/text.tex @@ -83,6 +83,11 @@ when the text controls contents changes - whether this is due to user input or comes from the program itself (for example, if SetValue() is called)} \twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Respond to a wxEVT\_COMMAND\_TEXT\_ENTER event, generated when enter is pressed in a single-line text control.} +\twocolitem{{\bf EVT\_TEXT\_URL(id, func)}}{A mouse event occured over an URL +in the text control (Win32 only)} +\twocolitem{{\bf EVT\_TEXT\_MAXLEN(id, func)}}{User tried to enter more text +into the control than the limit set by +\helpref{SetMaxLength}{wxtextctrlsetmaxlength}.} \end{twocollist}% %\wxheading{See also} @@ -514,6 +519,30 @@ Sets the insertion point at the given position. Sets the insertion point at the end of the text control. This is equivalent to \helpref{SetInsertionPoint}{wxtextctrlsetinsertionpoint}(\helpref{GetLastPosition}{wxtextctrlgetlastposition}()). +\membersection{wxTextCtrl::SetMaxLength}\label{wxtextctrlsetmaxlength} + +\func{virtual void}{SetMaxLength}{\param{unsigned long }{len}} + +This function sets the maximum number of characters the user can enter into the +control. In other words, it allows to limit the text value length to {\it len} +not counting the terminating {\tt NUL} character. + +If {\it len} is $0$, the previously set max length limi, if any, is discarded +and the user may enter as much text as the underlying native text control +widget supports (typically at least 32Kb). + +If the user tries to enter more characters into the text control when it +already is filled up to the maximal length, a +{\tt wxEVT\_COMMAND\_TEXT\_MAXLEN} event is sent to notify the program about it +(giving it the possibility to show an explanatory message, for example) and the +extra input is discarded. + +Note that this function may only be used with single line text controls. + +\wxheading{Compatibility} + +Only implemented in wxMSW/wxGTK starting with wxWindows 2.3.2. + \membersection{wxTextCtrl::SetSelection}\label{wxtextctrlsetselection} \func{virtual void}{SetSelection}{\param{long}{ from}, \param{long}{ to}}