[quote=364540:@Jeff Tullin]When I wanted something graphic, I used this approach
dim p as new picture (64, 64,32)
p.graphics.drawpicture // whatever
d.dragpicture = p[/quote]
except I already have PICTURE §
I need to change the cursor that is dragging said picture
either its not being set… or something is resetting it
[quote=364547:@Jeff Tullin]The mouse changes to that cursor automatically while you drag with the ALT button held. (Mac)
Thats the ‘move with copy’ signifier.[/quote]
that does work… but not what I want… I don’t want the user to need to press a key just to change the cursor
the question goes back to a more basic one.
[per the LR]
DragItem.MouseCursor
Property (As MouseCursor)
aDragItem.MouseCursor = newMouseCursorValue
or
MouseCursorValue = aDragItem.MouseCursor
The cursor to be displayed during the drag.
Example
The following example displays a custom cursor for the drag. It is in the MouseDown event of the ImageWell.
Dim d as DragItem
d=New DragItem(Self, X,Y,Me.width,Me.height)
d.DragPicture=Keaton534
d.MouseCursor=system.Cursors.HandOpen
d.picture=Me.Image
d.Drag //Allow the drag
This is a long winded thread, but inside, Jim mcKay shared some techniques to use different cursors during drag. Could be useful for what you want to obtain.
[quote=364561:@Michel Bujardet]This is a long winded thread, but inside, Jim mcKay shared some techniques to use different cursors during drag. Could be useful for what you want to obtain.
YES!
from the post Michel mentioned {Thanks Jim McKay}
Function DragEnter(obj As DragItem, action As Integer) As Boolean
Declare function NSClassFromString lib "Cocoa" (classname as CFStringRef) as ptr
Declare Function dragCopyCursor lib "Cocoa" selector "dragCopyCursor" (cls as ptr) as ptr
declare sub push lib "Cocoa" selector "push" (obj as ptr)
push(dragCopyCursor(NSClassFromString("NSCursor")))
End Function
and
Sub DragExit(obj As DragItem, action As Integer)
Declare function NSClassFromString lib "Cocoa" (classname as CFStringRef) as ptr
Declare Function dragCopyCursor lib "Cocoa" selector "dragCopyCursor" (cls as ptr) as ptr
declare sub pop lib "Cocoa" selector "pop" (obj as ptr)
pop(dragCopyCursor(NSClassFromString("NSCursor")))
End Sub