Autor Beitrag
_janosch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27



BeitragVerfasst: Mi 02.07.03 14:57 
Hallo zusammen,

ich beziehe einen String folgendermaßen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
function GetSelectedItems(s:TShellListView;i:Word;Var folder: String):String;
begin
  ...
  Result:=S.Folders[h].DisplayName;
  ...
end;

wenn ich diesen jedoch in einem StringGrid übergebe,
ausblenden Delphi-Quelltext
1:
2:
3:
...
stringG :( rid1.Cells[1,i+j]:=GetSelectedItems(ShellListView1,i,folder);
...

dann erscheint dieser String immer zusammen mit dem Dos-Namen, getrent durch "|" und am Ende auch noch mal mit "|". Gibt es einen Befehl, der dieses behebt?

Moderiert von user profile iconTino: Code- durch Delphi-Tags ersetzt.
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: Mi 02.07.03 17:19 
Ein Bug in TShellFoder.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
function GetSelectedItems(s:TShellListView;i:Word;Var folder: String):String
begin 
  ... 
  Result:=S.Folders[h].DisplayName; 
  SetLength(Result, StrLen(PChar(Result))); // richtige Länge setzen
  ... 
end;

_________________
Ist Zeit wirklich Geld?
_janosch Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27



BeitragVerfasst: Do 03.07.03 07:53 
Titel: funkt
das hat funktioniert. Danke !. :D