X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ee1377e1fa364f364b9a896c786c95ef177164cf..f155075229d771430f0793700f5048ad4be00e9d:/samples/dataview/dataview.cpp?ds=sidebyside diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cpp index df816643c9..857992884d 100644 --- a/samples/dataview/dataview.cpp +++ b/samples/dataview/dataview.cpp @@ -41,7 +41,7 @@ // resources // ---------------------------------------------------------------------------- -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif @@ -841,6 +841,7 @@ void MyFrame::OnBeginDrag( wxDataViewEvent &event ) wxTextDataObject *obj = new wxTextDataObject; obj->SetText( node->m_title ); event.SetDataObject( obj ); + event.SetDragFlags(wxDrag_AllowMove); // allows both copy and move } void MyFrame::OnDropPossible( wxDataViewEvent &event ) @@ -1170,7 +1171,7 @@ void MyFrame::OnAddTreeItem(wxCommandEvent& WXUNUSED(event)) if (ctrl->IsContainer(selected)) { wxDataViewItem newitem = ctrl->AppendItem( selected, "Item", 0 ); ctrl->Select(newitem); - ctrl->StartEditor(newitem, 0); + ctrl->EditItem(newitem, ctrl->GetColumn(0)); } }