]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/dataview/dataview.cpp
Don't use GetThreadId() in wxMSW code.
[wxWidgets.git] / samples / dataview / dataview.cpp
index df816643c97604f58fa193c66c9230ba4833cd40..857992884d39d4e6060bf2c970d2b6ec82d3d720 100644 (file)
@@ -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));
     }
 }