+See also \helpref{window styles overview}{windowstyles} and \helpref{wxTextCtrl::wxTextCtrl}{wxtextctrlctor}.
+
+\wxheading{wxTextCtrl text format}
+
+The multiline text controls always store the text as a sequence of lines
+separated by {\tt $\backslash$n} characters, i.e. in the Unix text format even
+on non-Unix platforms. This allows the user code to ignore the differences
+between the platforms but at a price: the indices in the control such as those
+returned by \helpref{GetInsertionPoint}{wxtextctrlgetinsertionpoint} or
+\helpref{GetSelection}{wxtextctrlgetselection} can {\bf not} be used as
+indices into the string returned by \helpref{GetValue}{wxtextctrlgetvalue} as
+they're going to be slightly off for platforms using
+{\tt $\backslash$r$\backslash$n} as separator (as Windows does), for example.
+
+Instead, if you need to obtain a substring between the $2$ indices obtained
+from the control with the help of the functions mentioned above, you should
+use \helpref{GetRange}{wxtextctrlgetrange}. And the indices themselves can
+only be passed to other methods, for example
+\helpref{SetInsertionPoint}{wxtextctrlsetinsertionpoint} or
+\helpref{SetSelection}{wxtextctrlsetselection}.
+
+To summarize: never use the indices returned by (multiline) wxTextCtrl as
+indices into the string it contains, but only as arguments to be passed back
+to the other wxTextCtrl methods.
+
+\wxheading{wxTextCtrl styles}
+
+Multi-line text controls support the styles, i.e. provide a possibility to set
+colours and font for individual characters in it (note that under Windows {\tt
+wxTE\_RICH} style is required for style support). To use the styles you can
+either call \helpref{SetDefaultStyle}{wxtextctrlsetdefaultstyle} before
+inserting the text or call \helpref{SetStyle}{wxtextctrlsetstyle} later to
+change the style of the text already in the control (the first solution is
+much more efficient).
+
+In either case, if the style doesn't specify some of the attributes (for
+example you only want to set the text colour but without changing the font nor
+the text background), the values of the default style will be used for them.
+If there is no default style, the attributes of the text control itself are
+used.
+
+So the following code correctly describes what it does: the second call
+to \helpref{SetDefaultStyle}{wxtextctrlsetdefaultstyle} doesn't change the
+text foreground colour (which stays red) while the last one doesn't change the
+background colour (which stays grey):