السلام عليكم
كود :
ListBox1.Sorted := true
count := 1
; '' =: Sec_str
for i:=0 to ListBox1.Items.Count-1 do begin
First_str := ListBox1.Items[i
if First_str = Sec_str then
count := count + 1
else
if Sec_str <> '' then begin
''('+ ((ListBox2.Items.Add(Sec_str + ' (' + IntToStr(count)'
count := 1
end;
Sec_str := First_str
