Fixed [ 1905777 ] Defining default accelerators for wxRichTextCtrl

Added standard accelerators for cut, copy, paste and select all.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2008-05-03 20:18:49 +00:00
parent 5cab4a770c
commit addcf76c65

View File

@ -32,6 +32,7 @@
#include "wx/dcbuffer.h"
#include "wx/arrimpl.cpp"
#include "wx/fontenum.h"
#include "wx/accel.h"
// DLL options compatibility check:
#include "wx/app.h"
@ -255,6 +256,17 @@ bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& va
GetBuffer().AddEventHandler(this);
// Accelerators
wxAcceleratorEntry entries[4];
entries[0].Set(wxACCEL_CMD, (int) 'C', wxID_COPY);
entries[1].Set(wxACCEL_CMD, (int) 'X', wxID_CUT);
entries[2].Set(wxACCEL_CMD, (int) 'V', wxID_PASTE);
entries[3].Set(wxACCEL_CMD, (int) 'A', wxID_SELECTALL);
wxAcceleratorTable accel(4, entries);
SetAcceleratorTable(accel);
return true;
}