From 501d2dd13e12ece3898e447753d7d46eb990a25e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 28 Apr 2002 13:34:40 +0000 Subject: [PATCH] added a (commented out) example of how to force the default action to be move git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/dnd/dnd.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/samples/dnd/dnd.cpp b/samples/dnd/dnd.cpp index 5815dd45ab..91c6cc0d2e 100644 --- a/samples/dnd/dnd.cpp +++ b/samples/dnd/dnd.cpp @@ -74,6 +74,16 @@ public: virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& text); + // uncomment this if you want to always force Move to be the default + // action, even under wxGTK where it is normally Copy +#if 0 + wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def) + { + wxDragResult res = wxTextDropTarget::OnDragOver(x, y, def); + return res == wxDragNone ? wxDragNone : wxDragMove; + } +#endif // 0 + private: wxListBox *m_pOwner; }; @@ -921,7 +931,7 @@ DnDFrame::DnDFrame(wxFrame *frame, char *title, int x, int y, int w, int h) file_menu->AppendSeparator(); file_menu->Append(Menu_NewFrame, "&New frame\tCtrl-N"); file_menu->AppendSeparator(); - file_menu->Append(Menu_Quit, "E&xit"); + file_menu->Append(Menu_Quit, "E&xit\tCtrl-Q"); wxMenu *log_menu = new wxMenu; log_menu->Append(Menu_Clear, "Clear\tCtrl-L"); -- 2.45.2