mam stringlist
CustomerNumbertLis := TStringList.Create();
CustomerNumbertList.Sorted := True;
CustomerNumbertList.Duplicates := dupIgnore;
CustomerNumbertList.Delimiter := ',';
CustomerNumbertList.QuoteChar := #0;
Następnie gdzieś w pętli dodaje kolejne linie:
CustomerNumbertList.Add(ds_customer.FieldByName('nr').AsString);
i na końcu wyświetlam komunikat
ShowMessage(CustomerNumbertList.DelimitedText);
Problem w tym że kiedy tych linii w liście jest dużo, to komunikat wychodzi poza szerokość ekranu.
Więc w pętli zrobiłem tak:
if (CustomerNumbertList.Count > 0) and (CustomerNumbertList.Count mod 12 = 0) then
CustomerNumbertList.Add(#13#10 + ds_customer.FieldByName('nr').AsString)
else
CustomerNumbertList.Add(ds_customer.FieldByName('nr').AsString)
i teraz na linii ShowMessage(CustomerNumbertList.DelimitedText)
mam AccesViolation.
Poradzicie coś?