26-10-2011, 07:03 PM
بارك الله فيك كنت أبحث عن النواة التي أدرجتها و بها أستخرجت :
أي يمكن التنقل من المكونين بـdouble click
كود :
procedure TForm1.Button1Click(Sender: TObject);
begin
if ListBox1.itemindex<>-1 then
ListBox2.Items.Add(ListBox1.Items[ListBox1.ItemIndex]);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
listbox1.Items.LoadFromFile(ExtractFilePath(Application.ExeName)+'Fichier1.txt');
end;
procedure TForm1.ListBox1DblClick(Sender: TObject);
begin
if ListBox1.itemindex<>-1 then
begin
ListBox2.Items.Add(ListBox1.Items[ListBox1.ItemIndex]);
ListBox1.Items.Delete(ListBox1.ItemIndex);
end;
end;
procedure TForm1.ListBox2DblClick(Sender: TObject);
begin
if ListBox2.itemindex<>-1 then
begin
ListBox1.Items.Add(ListBox2.Items[ListBox2.ItemIndex]);
ListBox2.Items.Delete(ListBox2.ItemIndex);
end;
end;
أدبني الدهر فأراني نقص عقلي وإذا ما ازددت علما زادني علما بجهلي

