-
-
Save chamons/a0ce25b67ddd87f2b05d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/NSOutlineViewAndTableView/NSOutlineViewAndTableViewExample/NSOutlineViewCode/NSOutlineViewExample.cs b/NSOutlineViewAndTableView/NSOutlineViewAndTableViewExample/NSOutlineViewCode/NSOutlineViewExample.cs | |
index b41e4b5..cd9012f 100644 | |
--- a/NSOutlineViewAndTableView/NSOutlineViewAndTableViewExample/NSOutlineViewCode/NSOutlineViewExample.cs | |
+++ b/NSOutlineViewAndTableView/NSOutlineViewAndTableViewExample/NSOutlineViewCode/NSOutlineViewExample.cs | |
@@ -15,6 +15,8 @@ namespace NSOutlineViewAndTableViewExample | |
Frame = frame | |
}; | |
+ outlineView.RegisterForDraggedTypes (new string[] { NSPasteboard.NSStringType }); | |
+ | |
// Every NSOutlineView must have at least one column or your Delegate will not be called. | |
NSTableColumn column = new NSTableColumn ("Values"); | |
outlineView.AddColumn (column); | |
@@ -76,6 +78,22 @@ namespace NSOutlineViewAndTableViewExample | |
{ | |
parentNode = Node.CreateExampleTree (); | |
} | |
+ | |
+ public override bool AcceptDrop (NSOutlineView outlineView, NSDraggingInfo info, NSObject item, nint index) | |
+ { | |
+ return true; | |
+ } | |
+ | |
+ public override NSDragOperation ValidateDrop (NSOutlineView outlineView, NSDraggingInfo info, NSObject item, nint index) | |
+ { | |
+ return NSDragOperation.Copy; | |
+ } | |
+ | |
+ public override INSPasteboardWriting PasteboardWriterForItem (NSOutlineView outlineView, NSObject item) | |
+ { | |
+ NSString s = (NSString)""; | |
+ return s; | |
+ } | |
public override nint GetChildrenCount (NSOutlineView outlineView, NSObject item) | |
{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment