[Gambas-user] Drag & Drop ListView selection, does not work

gian bagoneo at libero.it
Sat Sep 24 23:08:55 CEST 2022


Il 24/09/22 22:43, T Lee Davidson ha scritto:
> On 9/23/22 16:58, gian via User wrote:
>> In this test if you try to move by dragging it with the left mouse 
>> button an Item to another Item the first Item will take the position 
>> of the other Item which will move together with all those that precede 
>> (or follow) it by one position.
>>
>> My intent is to obtain, along with the displacement, a correct 
>> selection of the displaced Item.
>>
>> The selection happens correctly only after the third attempt, from 
>> there on it works fine, why?
> 
> I am finding the same behavior.
> 
> After the very first drag and drop operation, *something* is causing the 
> internal item cursor to be set to the original position of the dragged 
> item, and the item now in that position is also selected. It is as if 
> the ListView is attempting to maintain the GUI state of the container. 
> An iteration of the System.Backtrace collection, coded within the 
> ListView1_Select event handler, indicates it may be related to 
> GridView.TimerScroll_Timer.1202.
> 
> That internally-forced selection is repeated with every press of the 
> keyboard down-arrow and can only be overcome by manually making a 
> selection with the mouse. Once it is overcome, the behavior is as expected.
> 
> I think there is nothing you can do to alleviate that anomalous 
> behavior, Gianluigi. I think we need someone like Benoît to confirm the 
> behavior of ListView/TreeView/GridView after Remove/Add or Drag/Drop 
> operations.
> 
> 

Hi Lee,

thank you for the test.
Maybe Benoit willingly could come up with a solution  :-)

Regards
Gianluigi


More information about the User mailing list