Hola Carmelo Cash.
Usando un
TListBox se me ocurre un modo de hacer lo que mencionas en el primer mensaje.
Código Delphi
[-]
...
var
SL: TStrings;
procedure TForm1.FormCreate(Sender: TObject);
begin
SL := TStringList.Create;
ListBox1.DragMode := dmAutomatic;
ListBox1.MultiSelect := True;
end;
procedure TForm1.ListBox1DragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
begin
Accept := (Sender as TListBox).SelCount > 0;
end;
procedure TForm1.ListBox1DragDrop(Sender, Source: TObject; X, Y: Integer);
var
i, p: Integer;
begin
with (Sender as TListBox) do
begin
SL.Clear;
for i := 0 to Count-1 do
if Selected[i] then SL.Add(Items[i]);
for i := Count -1 downto 0 do
if Selected[i] then Items.Delete(i);
p := ItemAtPos(Point(X, Y), True);
Items.BeginUpdate;
try
for i := SL.Count-1 downto 0 do
Items.Insert(p, SL[i]);
finally
Items.EndUpdate;
end;
end;
end;
...
Te permitirá insertar uno o mas items dentro del mismo ListBox mediante Drag&Drop.
Tene en cuenta que: No hace ninguna organización sobre la selección múltiple (si los items fueran mas de uno). Y, si los ítems del ListBox fueran muchos, no será muy eficiente.
Saludos.