refactor wxMSW code to extract parts common to wxTextCtrl and wxComboBox into wxTextEntry
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#endif //WX_PRECOMP
|
||||
|
||||
#include "wx/textentry.h"
|
||||
#include "wx/clipbrd.h"
|
||||
|
||||
// ============================================================================
|
||||
// wxTextEntryBase implementation
|
||||
@@ -97,7 +98,16 @@ bool wxTextEntryBase::CanCut() const
|
||||
|
||||
bool wxTextEntryBase::CanPaste() const
|
||||
{
|
||||
return IsEditable();
|
||||
if ( IsEditable() )
|
||||
{
|
||||
#if wxUSE_CLIPBOARD
|
||||
// check if there is any text on the clipboard
|
||||
if ( wxTheClipboard->IsSupported(wxDF_TEXT) )
|
||||
return true;
|
||||
#endif // wxUSE_CLIPBOARD
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif // wxUSE_TEXTCTRL || wxUSE_COMBOBOX
|
||||
|
||||
Reference in New Issue
Block a user