added wxTextCtrl::GetSelection() returning a wxString - useful for multiline controls under Windows

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-11-14 01:27:16 +00:00
parent 9327c3aa02
commit 184144794d
6 changed files with 71 additions and 1 deletions

View File

@@ -685,6 +685,18 @@ void MyTextCtrl::OnKeyDown(wxKeyEvent& event)
case WXK_F7:
ShowPosition(10);
break;
case WXK_F10:
{
long from, to;
GetSelection(&from, &to);
wxString sel = GetSelection();
wxLogMessage(_T("Selection: from %ld to %ld."), from, to);
wxLogMessage(_T("Selection = '%s' (len = %u)"),
sel.c_str(), sel.length());
}
}
if ( ms_logKey )