>>719
なんかおかしな点ありますか?
Listでやるとこのままでもうまくいくんですが・・・。
int operations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK;
// Create the drag source on the tree
DragSource ds = new DragSource(tree, operations);
TextTransfer[] t ;
t ~= TextTransfer.getInstance();
ds.setTransfer(t);
ds.addDragListener(new class(tree) DragSourceAdapter {
Tree tree;
this(Tree _tree) {
this.tree = _tree;
}
void dragStart(DragSourceEvent event) {
Stdout("drag").newline;
event.doit = (this.tree.getSelection().length != 0);
}
public void dragSetData(DragSourceEvent event) {
Stdout("dragSetData").newline;
// Set the data to be the first selected item's text
auto txt = new ArrayWrapperT!(char)(this.tree.getSelection()[0].getText());
event.data = txt;
}
});