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:
@@ -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 )
|
||||
|
Reference in New Issue
Block a user