Help needed with drag icon

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Help needed with drag icon

bill-lancaster
I have a DrawingArea with a series of images drawn within.
I can move an image within the DrawingArea but how to show a drag,icon while the image is being dragged?

Public Sub dwgImage2_MouseDrag()
    Drag.Icon = Picture["icon:/64/linux"]
End

This code doesn't show any icon during the drag operetraion.

Any advice would be appreciated

Reply | Threaded
Open this post in threaded view
|

Re: Help needed with drag icon

Gianluigi
Could You take a look at DragNDrop in Examples.
Maybe it could help

Regards
Gianluigi

2017-04-27 16:23 GMT+02:00 bill-lancaster <[hidden email]>:

> I have a DrawingArea with a series of images drawn within.
> I can move an image within the DrawingArea but how to show a drag,icon
> while
> the image is being dragged?
>
> Public Sub dwgImage2_MouseDrag()
>     Drag.Icon = Picture["icon:/64/linux"]
> End
>
> This code doesn't show any icon during the drag operetraion.
>
> Any advice would be appreciated
>
>
>
>
>
> --
> View this message in context: http://gambas.8142.n7.nabble.
> com/Help-needed-with-drag-icon-tp58829.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Help needed with drag icon

Charlie
In reply to this post by bill-lancaster
Have a look at my previous efforts regarding this here http://gambas.8142.n7.nabble.com/Drag-Icon-td58574.html

Check out www.gambas.one

Reply | Threaded
Open this post in threaded view
|

Re: Help needed with drag icon

bill-lancaster
Thanks Guys,
Yes, I had looked at those examples already.
They both have code like:-
    Drag.Icon = Last.Picture
    Last.Drag(Last.Picture.Image)

or
Last.Drag(Last.Tag)
Drag.Icon = Picture["icon:/32/add"]

Problem is that I don't have a last.image or a last.tag.

I'm dragging a shape that has been created in code.
Imagine an empty drawing area, click at some point then drag.  How would you show an icon at that point?
Reply | Threaded
Open this post in threaded view
|

Re: Help needed with drag icon

bill-lancaster
OK, I had a feeling I was being stupid!
I don't need to show an icon anyway, just draw a shape that tracks the mouse during the drag event.
Thanks anyway.