let Ctrl-C work even in a readonly text control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1324,11 +1324,13 @@ long wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
|
|
||||||
if ( nMsg == WM_GETDLGCODE )
|
if ( nMsg == WM_GETDLGCODE )
|
||||||
{
|
{
|
||||||
|
// we always want the chars and the arrows: the arrows for navigation
|
||||||
|
// and the chars because we want Ctrl-C to work even in a read only
|
||||||
|
// control
|
||||||
|
long lDlgCode = DLGC_WANTCHARS | DLGC_WANTARROWS;
|
||||||
|
|
||||||
if ( IsEditable() )
|
if ( IsEditable() )
|
||||||
{
|
{
|
||||||
// we always want the chars and the arrows
|
|
||||||
long lDlgCode = DLGC_WANTCHARS | DLGC_WANTARROWS;
|
|
||||||
|
|
||||||
// we may have several different cases:
|
// we may have several different cases:
|
||||||
// 1. normal case: both TAB and ENTER are used for dlg navigation
|
// 1. normal case: both TAB and ENTER are used for dlg navigation
|
||||||
// 2. ctrl which wants TAB for itself: ENTER is used to pass to the
|
// 2. ctrl which wants TAB for itself: ENTER is used to pass to the
|
||||||
@@ -1349,15 +1351,11 @@ long wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
}
|
}
|
||||||
else // !editable
|
else // !editable
|
||||||
{
|
{
|
||||||
// when the control can't be edited by user, it doesn't need any
|
|
||||||
// extra keys changing its contents at all -- but it still needs
|
|
||||||
// the arrows to allow navigating in it
|
|
||||||
//
|
|
||||||
// NB: use "=", not "|=" as the base class version returns the
|
// NB: use "=", not "|=" as the base class version returns the
|
||||||
// same flags is this state as usual (i.e. including
|
// same flags is this state as usual (i.e. including
|
||||||
// DLGC_WANTMESSAGE). This is strange (how does it work in the
|
// DLGC_WANTMESSAGE). This is strange (how does it work in the
|
||||||
// native Win32 apps?) but for now live with it.
|
// native Win32 apps?) but for now live with it.
|
||||||
lRc = DLGC_WANTARROWS;
|
lRc = lDlgCode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user