[Gambas-user] How to get grid view cell / Icon view item by the position of mouse click

Phạm Quang Dương soleilpqd at ...626...
Sat Dec 18 15:57:01 CET 2010


Hi,

1. From Wiki:
*GridView.Find*

Finds a cell from mouse coordinates relative to the control.

This function returns TRUE <http://gambasdoc.org/help/lang/true> if no cell
is found. Otherwise, the found cell is accessible from the
Item<http://gambasdoc.org/help/comp/gb.qt/gridview/item>property.
But I don't find grid view's Item property.

2. I followed the "Drag and Drop" example to make an Icon view with that I
can drag & drop to reorder  items. It works fine with unscrolled-yet Icon
view. But after scroll the icon view toward bottom, I got wrong item.
I can not find the solution, so I tried with Grid view (with ScrollX &
ScrollY property) but I have same problem.
Here is the demo project. For simpler, I test with mouse down event: open,
click => get right cell; then scroll, click => wrong cell.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: demoGrid-0.0.1.tar.gz
Type: application/x-gzip
Size: 8335 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20101218/187961c3/attachment.bin>


More information about the User mailing list