[Gambas-user] Drop into a GridView - how to hit a cell
Rolf-Werner Eilert
rwe-sse at osnanet.de
Mon Apr 23 08:48:02 CEST 2018
Am 20.04.2018 um 15:33 schrieb Charlie Ogier:
> On 20/04/18 13:06, Rolf-Werner Eilert wrote:
>> Am 20.04.2018 um 13:40 schrieb Benoît Minisini:
>>> Le 20/04/2018 à 13:22, Rolf-Werner Eilert a écrit :
>>>> When I drag and drop data into a GridView, I want to hit a certain
>>>> cell.
>>>>
>>>> Within the GridView_Drop event, however, .Column and .Row aren't set
>>>> automagically to the aimed cell where the mouse button was released.
>>>>
>>>> So I have to hit the cell myself. First idea: using Drag.X and
>>>> Drag.Y, and then...?
>>>>
>>>> Any more comfortable idea is appreciated :)
>>>>
>>>> Regards
>>>> Rolf
>>>>
>>>
>>> Use RowAt() and ColumnAt() methods.
>>>
>>> Regards,
>>>
>>
>> Thank you! Now it works as expected.
>>
>> Regards
>> Rolf
>>
>>
>> --------------------------------------------------
>>
>> This is the Gambas Mailing List:
>> https://lists.gambas-basic.org/listinfo/user
>>
>> Search the list:
>> https://lists.gambas-basic.org/cgi-bin/search.cgi
>>
>> Hosted by https://www.hostsharing.net
> Hi Rolf,
>
> What did you put in RowAt() and ColumnAt()?
> I tried RowAt(Mouse.Y) and ColumnAt(Mouse.X) but that only returned the
> Row/Col of the 1st Gridview.
>
> Thanks,
>
> Charlie
>
In GridView1_Drop() I put:
With GridView1
.Row = .RowAt(Drag.Y)
.Column = .ColumnAt(Drag.X)
Regards
Rolf
More information about the User
mailing list