Discussion:
Drag&Drop?
Cees De Groot
2006-07-19 15:18:02 UTC
Permalink
Simple question: we want to add a bit of drag and drop, but the
constructor of WxDropSource always gives a primitive failed...

handleMouseEventInList: aMouseEvent
aMouseEvent dragging
ifTrue: [
| data src result |
selectedFile ifNil: [^self].
data := WxTextDataObject text: selectedFile qualifiedReference.
src := WxDropSource data: data win: listctrl iconCopy: WxCursor
handCursor iconMove: WxCursor handCursor iconNone: WxCursor
handCursor.
result := src doDragDrop.
]
ifFalse: [
aMouseEvent skip]

Anything obviously wrong here? Or is DnD simply not supported at this time?

TIA,

Cees

Loading...