Forum > LCL

Problem with dragging a TDragObject on Linux

(1/2) > >>

Jurassic Pork:
 coming with Lazarus there is an example to use a TDragObject :   Lazarus/examples/dragImageList
with this example you drag a button and drop it on a target.
When i use original source code, no problem , the TDragObject moves with cursor (See DragImageList1.gif)
Now, i want to put the cursor on the center of the dragObject. To do this i use this code :

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  FDragImages.DragHotspot := Point(Bitmap.Width div 2, Bitmap.Height div 2); The problem is that the TDragObject moves only when the cursor goes out of it (See DragImageList2.gif)
Another problem, you can't drop the Tdragobject.
There is no such problem on Windows.
So what is wrong ?   

Friendly J.P

Jurassic Pork:
nobody to answer me  :'(

Clearly the way TDragObject is implemented for the gtk widgetset is buggy.
I think report it on mantis as a platform-specific issue. Perhaps QT and carbon/cocoa are OK?

Jurassic Pork:
thanks , i will try


Just tested on Linux with no problems:

fpc 3.04 Laz 2.08 gtk2 Linux64



[0] Message Index

[#] Next page

Go to full version