]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/text.tex
removed small as otherwise the code was apparently unreadable in HTML docs
[wxWidgets.git] / docs / latex / wx / text.tex
index 8d26a475c31ec339757daa6013a355228fdb84cc..09e9b045fae30caf85394da744b366e03ca4cd7d 100644 (file)
@@ -42,7 +42,7 @@ it to always show it. It doesn't do anything under other platforms.}
 \twocolitem{\windowstyle{wxHSCROLL}}{A horizontal scrollbar will be created. No effect under GTK+.}
 \end{twocollist}
 
-See also \helpref{window styles overview}{windowstyles} and 
+See also \helpref{window styles overview}{windowstyles} and
 \helpref{wxTextCtrl::wxTextCtrl}{wxtextctrlconstr}.
 
 \wxheading{wxTextCtrl and C++ streams}
@@ -138,7 +138,7 @@ 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 
+into the control than the limit set by
 \helpref{SetMaxLength}{wxtextctrlsetmaxlength}.}
 \end{twocollist}%
 
@@ -368,6 +368,13 @@ working with controls that contain large amounts of text.
 Gets the current selection span. If the returned values are equal, there was
 no selection.
 
+Please note that the indices returned may be used with the other wxTextctrl
+methods but don't necessarily represent the correct indices into the string
+returned by \helpref{GetValue()}{wxtextctrlgetvalue} for multiline controls
+under Windows (at least,) you should use
+\helpref{GetStringSelection()}{wxtextctrlgetstringselection} to get the selected
+text.
+
 \wxheading{Parameters}
 
 \docparam{from}{The returned first position.}
@@ -380,6 +387,13 @@ consisting of the from and to values.}
 \perlnote{In wxPerl this method takes no parameter and returns a
 2-element list {\tt ( from, to )}.}
 
+\membersection{wxTextCtrl::GetStringSelection}\label{wxtextctrlgetstringselection}
+
+\func{virtual wxString}{GetStringSelection}{\void}
+
+Gets the text currently selected in the control. If there is no selection, the
+returned string is empty.
+
 \membersection{wxTextCtrl::GetValue}\label{wxtextctrlgetvalue}
 
 \constfunc{wxString}{GetValue}{\void}
@@ -580,7 +594,7 @@ 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 
+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.