Thema: Delphi Problem bei TStringList

Einzelnen Beitrag anzeigen

Popov
(Gast)

n/a Beiträge
 
#20

AW: Problem bei TStringList

  Alt 12. Jun 2014, 00:35
Dann kann man den Teil
Delphi-Quellcode:
    StringRoh := AValues[LIdx];
    Zeit := Copy(StringRoh, 1, 5);
    Info := StringRoh;
    if Length(StringRoh) > 6 then
      Delete(Info,1,6);

    Labels[LIdx].Caption := (Zeit + ' - ' + Info);
so ankürzen:
Delphi-Quellcode:
      StringRoh := AValues[LIdx];
      Labels[LIdx].Caption := Copy(StringRoh, 1, 5) + ' - ' + IfThen(Length(StringRoh) > 6, Copy(StringRoh, 7, MaxInt), StringRoh);
U. U. kann man noch AValues[LIdx] noch gegen StringRoh tauschen, dann ist das alles nur noch eine Zeile.
  Mit Zitat antworten Zitat