I have had another look at this but i can't work out why clicking on delete after selecting an item behaves differently from dragging an item onto the delete node. It appears to be triggered by the Lv.Items.RemoveAt, which causes the scroll when dragged but not when clicked, although the scroll is not registered if a scroll listener is applied to the ListView.
I have also tried changing the Transfer mode to Copy, but it is no different.
If it were my project I would now try implementing dragging without using the library to see if it behaves in the same manner.
I have no idea what causes the effect you mention, but I managed to avoid it using your example project. Maybe it's an "workaround", but I think the behavior is the desired one, just requesting focus to target pane, in Drag Exit event.
B4X:
Sub MToMMoveT_DragExited(e As DragEvent)
Log("MToMMoveT DragExited")
Dim L As TextArea = e.GetEventSource
L.Style = ";-fx-control-inner-background: rgba(95,158,160,.2);"
L.RequestFocus
End Sub
I can only come up with the fact that as in the original, the focused view is removed, it forces a redraw of the whole ScrollView. Where as moving the focus to a view that isn't removed negates the need for a redraw. But can't really prove the theory.
Thinking about it further I think it's more likely that if the focused node is not removed then the scroll pane is scrolled to maintain it's position. If the focused node is removed, then it can't reposition itself.
I have no idea what causes the effect you mention, but I managed to avoid it using your example project. Maybe it's an "workaround", but I think the behavior is the desired one, just requesting focus to target pane, in Drag Exit event.
B4X:
Sub MToMMoveT_DragExited(e As DragEvent)
Log("MToMMoveT DragExited")
Dim L As TextArea = e.GetEventSource
L.Style = ";-fx-control-inner-background: rgba(95,158,160,.2);"
L.RequestFocus
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.