[Gambas-user] TableView1_Drop on which row/col? Ok: Drop.X

wig wig at ...1809...
Mon Jun 30 11:21:30 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.
>
>
> ----------------------------------------------------------------------------

Ok, I think not the Mouse.X but the Drop.X and Drop.Y seem to work!





More information about the User mailing list