[Gambas-user] TableView1_Drop on which row/col?

wig wig at ...1809...
Fri Jun 27 16:58:33 CEST 2014


> Le 27/06/2014 13:36, wig a écrit :
>>
>>
>> I try to drag the text from a textlabel to a cell on my TableView.
>>
>> How to determine the cell where the drop happened?
>>
>> Public Sub TableView1_Drop()
>>
>>   Debug TableView1.Row
>>
>>   Debug TableView1.Column
>>
>> ' TableView1[Row, Column].Text = Drag.Data
>>
>> End
>>
>> This Debug gives me -1 for each, so that's not the way.
>>
>> I didn't find an example or an answer in mailinglist search,
>> documentation.
>>
>> Thanks for giving me a clue..
>>
>> WiG
>>
> Re: [Gambas-user] TableView1_Drop on which ro
> You must use the RowAt() and ColumnAt() methods. They should take the
> mouse position directly.
>
> --
> Benoît Minisini
>

I tried TableView1.RowAt() with Mouse.X as parameter

I get values that I cannot interprete and even not reproduce with several
drag and drops.

So I looked first at the value of Mouse.X and Mouse.Y in TableView1_Drop,
but I don't understand the values I get.

I compared with MouseDown and MouseUp, these give reasonable values.

Probably I just miss the understanding of some concept.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestTableViewDrop-0.0.1.tar.gz
Type: application/x-gzip
Size: 5432 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20140627/2f8a3669/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DragDropTableView1.png
Type: image/png
Size: 50321 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20140627/2f8a3669/attachment.png>


More information about the User mailing list