Autor Beitrag
hpburner
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20



BeitragVerfasst: Sa 01.03.03 01:56 
Wie kann ich die Items die in einer fielistbox aktiviert sind alle + PFAD zu einer memo hinzufügen ?!

bisher verwende ich folgenden code :

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
var i : integer;
   begin
   for i:= 0 to FileListBox1.items.count - 1 do
      if FileListBox1.Selected[i] then
         memo.lines.add('dummy '+Form1.FileListBox1.items[i]);
    end;



allerdings habe ich dann den pfad nicht
wenn ich nur eine datei hinzufügen will nehme ich folgenden code :

ausblenden Quelltext
1:
memo.Lines.Add('dummy '+filelistbox1.FileName)					


da hab ich dann auch den pfad enthalten ?! iwe lässt sich das ändern am liebsten wärs mir sogar wenn der Pfad relativ wäre ;)

cu und danke für Hilfe ..........
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 01.03.03 06:40 
FileListbox kennt die Eigenschaft Path:
ausblenden Quelltext
1:
FileListbox1.Directory+'\'+FileListbox1.Items.Strings[FileListbox1.ItemIndex];					
hpburner Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20



BeitragVerfasst: Sa 01.03.03 13:26 
danke dir hat alles soweit geklappt

eine Frage noch :

Wie kann ich die letzte Zeile in nem Memo löschen aber nur die letzte ?
nmit memo.clear löscht er ja alles
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Sa 01.03.03 13:33 
hpburner hat folgendes geschrieben:
eine Frage noch :

Neue Frage -> Neues Topic. Bitte in Zukunft daran halten!

ausblenden Quelltext
1:
Memo1.Lines.Delete (Memo1.Lines.Count -1);					


Gruß
TINO
hpburner Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20



BeitragVerfasst: Sa 01.03.03 14:46 
ja danke!

werd mcih dran halten