Drag Icon

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

Drag Icon


I can't understand why my drag icon is not changing with the following code...

Public Sub TilesGroup_MouseDrag()

  If Mouse.Left Then
    Drag.Icon = Picture["icon:/32/add"]
  End If


where TileGroup is a group of Buttons in an array:

 Tiles[i, j] = New Button(Me) As "TilesGroup"

* On a broader level, where can I find examples or more detailed information about how to use the Drag and Drop functionality? The wiki (http://gambaswiki.org/wiki/comp/gb.qt4/drag) is quite sparse and has no examples.
Reply | Threaded
Open this post in threaded view

Re: Drag Icon

There seems to be an issue depending on which Component you use: -

gb.gui & gb.gtk3 only give a default 'drag.icon'
gb.qt4 works as desired but only on the 2nd and subsequent 'drags'

This is what I managed to get working: -

Interestingly Shutter will only capture the image when using gb.qt4
(I don't have QT5 so there may be more differences!)

Check out www.gambas.one