Mega Code Archive

 
Categories / Delphi / VCL
 

Listbox içindeki itemsleri asağı yukarı taşımak

procedure TForm1.BtnYukariClick(Sender: TObject); begin with ListBox1 do if (ItemIndex <> -1) and (ItemIndex > 0) then Items.Exchange(ItemIndex, ItemIndex - 1); end; procedure TForm1.BtnAsagiClick(Sender: TObject); begin with ListBox1 do if (ItemIndex <> -1) and (ItemIndex < Items.Count - 1) then Items.Exchange(ItemIndex, ItemIndex + 1); end;