I am trying to enable the dragging and dropping for TListBoxItems inside a TListBox in FireMonkey. It seems to drag and drop sometimes, but other times it does not even enter the event handler
procedure TForm1.ListBox1DragChange(SourceItem, DestItem: TListBoxItem; var Allow: Boolean);
begin
SourceItem.Index := DestItem.Index;
end;
I have the DragMode as dmManual
object ListBox1: TListBox
Height = 200.000000000000000000
Position.X = 224.000000000000000000
Position.Y = 144.000000000000000000
TabOrder = 1
Width = 200.000000000000000000
AllowDrag = True
Items.Strings = (
‘First’
‘Second’
‘Third’
‘Fourth’
‘Fifth’
‘Sixth’)
DefaultItemStyles.ItemStyle = ”
DefaultItemStyles.GroupHeaderStyle = ”
DefaultItemStyles.GroupFooterStyle = ”
OnDragChange = ListBox1DragChange
end