23-01-2016, 10:31 PM
كود :
Var
count,i : integer;
str:string;
begin
ListBox1.Sorted := true;
count := 1;
str:=ListBox1.Items[0];
for i:=1 to ListBox1.Items.Count-1 do
if str = ListBox1.Items[i] then begin
inc(count);
ListBox1.Items[i]:=ListBox1.Items[i]+'('+IntToStr(count)+')';
end else begin
count := 1;
str:=ListBox1.Items[i];
end;
end;
رَبَّنَا اغْفِرْ لِي وَلِوَالِدَيَّ وَلِلْمُؤْمِنِينَ يَوْمَ يَقُومُ الْحِسَابُ

