TAdvListbox Drag Drop

Is there an example of Drag and Drop ( move items up and down )


It seems that it is a bit different than the normal listbox in delphi.




There was one minor improvement necessary in the component that we did to make it possible via:


procedure TForm1.AdvListBox1DragDrop(Sender, Source: TObject; X, Y: Integer);
var
  nli,li: TListBoxItem;
  i: integer;
begin
  i := advlistbox1.GetItemAtXY(x,y).Index;
  li := advlistbox1.Items[advlistbox1.ItemIndex];
  nli := advlistbox1.Items.Insert(i);
  nli.Assign(li);
  li.Free;
  advlistbox1.ItemIndex := i;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  advlistbox1.DragMode := dmAutoMatic;
end;


The needed improvement will be in the next update.