Autor Beitrag
rego
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: Do 25.08.05 14:55 
hi again,

ich habe eine filelistbox erstellt die mir den angewählten namen liefert

beispiel: c:\programme\xxx\yyy\dateiname.abc

wie schneide ich alles bis auf "dateiname" ab ? mich interessiert nur der name, weder die position noch der typ.

rego

Moderiert von user profile iconTino: Titel geändert & zweite Frage entfernt.
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Do 25.08.05 14:58 
Gucke mal in die Delphi Hilfe unter ExtractFileName.

Gruß
Klabautermann
rego Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: Do 25.08.05 15:02 
entweder gibts das in delphi 5 nicht oder ich finds nicht.
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Do 25.08.05 15:07 
user profile iconrego hat folgendes geschrieben:
entweder gibts das in delphi 5 nicht oder ich finds nicht.

Probiere man den Befehl ExtractFileName in deinen Quellcode zu tippen, die Eingabemarke hinein zu setzen und dann F1 zu drücken. Mein D5 spuckt mir dann die richtige Information aus.

Gruß
Klabautermann
rego Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: Fr 26.08.05 09:26 
das schneidet aber nur alles vor dem dateinamen ab und nicht dahinter (das .csv bleibt noch dran) und wie bekomme ich ein hintergrundbild rein, sodass ich meine labels noch lesen kann ?
rego Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: Fr 26.08.05 09:45 
ich hab das abgeschnitten bekommen, mir fehlt nun nurnoch das doofe hintergrundbild.
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Fr 26.08.05 10:46 
also zur eigentlich Frage zurück. Versuchs doch mal so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
function XY(Path:string): string;
var s: string;
begin
s := ExtractFileName(Path);
s := copy(s, 0, (length(s) - (length(extractfileext(Path))));
Result := s;  //hier sieht man, dass das Einführen von s eigentlich überflüssig ist. Man kann stattdessen auch gleich mit Result arbeiten...


Ich hoffe es funtzt