08-01-2011, 11:59 AM
أولا بعض التصحيح
كود :
For i:=1 to 5-1 do
Begin
a:=form1.stringgrid1.cells[0,i ];
For j := i+1 to 5 do
Begin
b:=form1.stringgrid1.cells[0,j];
If a = b then Stringgrid1.cells[0,j]:='';
End;
End;كود :
For i:=1 to 5-1 do
For j := i+1 to 5 do
If Stringgrid1.cells[0,i]=Stringgrid1.cells[0,j] then Stringgrid1.cells[0,j]:='';كود :
var count;
begin
count:=5;كود :
i:=count;
repeat
If Stringgrid1.cells[0,i-1]='' then
Begin
Stringgrid1.cells[0,i-1]:=Stringgrid1.cells[0,i];
Stringgrid1.cells[0,i]:='';
End;
i:=i-1;
until i=1;كود :
var count,i,j : integer;
begin
count:=5;
For i:=1 to count-1 do
For j := i+1 to count do
If Stringgrid1.cells[0,i]=Stringgrid1.cells[0,j] then Stringgrid1.cells[0,j]:='';
i:=count;
repeat
If Stringgrid1.cells[0,i-1]='' then
Begin
Stringgrid1.cells[0,i-1]:=Stringgrid1.cells[0,i];
Stringgrid1.cells[0,i]:='';
End;
i:=i-1;
until i=1;
end;
