Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#57

AW: Record zu TStringlist hinzufügen

  Alt 13. Jun 2017, 12:26
Habe da jetzt ein kleines Problem
Wie kann ich die Einträge in der Liste verschieben ?

Delphi-Quellcode:
                  if (Item + ID_MAIN) <> FlagFound then
                  begin
                    if Prop.ShortCutfound > 0 then
                      NewLen := Sprites.Count + Prop.ShortCutfound
                    else
                      NewLen := Sprites.Count;

                    Sprites.Add(TSprite.Create);
                    CreateRecycleBin(MainHandle, NewLen);
                    for x := ID_FIRST to NewLen do
                    begin
                      Sprites[x] := Sprites[x + 1];
                      if x = (NewLen - Prop.ShortCutfound) then
                      begin
                        for X1 := (NewLen - 1) downto (NewLen - Prop.ShortCutfound) do
                          Sprites.Delete(X1);
                      end;
                    end;
                    FlagFound := count;
                  end;
vorher mit dem Array war das kein Problem.

Delphi-Quellcode:
                  if (Item + ID_MAIN) <> FlagFound then
                  begin
                    if Prop.ShortCutfound > 0 then
                      NewLen := High(Sprite) + Prop.ShortCutfound
                    else
                      NewLen := High(Sprite) + 1;

                    Setlength(Sprite, NewLen);
                    CreateRecycleBin(MainHandle, NewLen);
                    for x := ID_FIRST to NewLen do
                    begin
                      Sprite[x] := Sprite[x + 1];
                      if x = (NewLen - Prop.ShortCutfound) then
                      begin
                        for X1 := (NewLen - 1) downto (NewLen - Prop.ShortCutfound) do
                          Delete(Sprite, X1);
                      end;
                    end;
                    FlagFound := count;
                  end;
gruss
  Mit Zitat antworten Zitat