Make wxTextCtrl behaviour in all ports consistent with the documentation and also update wxStyledTextCtrl to behave accordingly. Closes #18431.