Autor Beitrag
Supernova
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 108

WinXP
D7 Prof
BeitragVerfasst: So 18.01.04 15:29 
HI!

Wisst ihr wie ich den Pfad von einer TListview Anzeigenlassen kann ??
Hab's mal so Versucht ( Ich weiß es ist eine Blöde Idee !!!):oops:
ausblenden Delphi-Quelltext
1:
Edit1.Text:=ListView1.path;					


Supernova ::::::::::

Moderiert von user profile iconTino: Titel geändert; Topic verschoben; Topic gesplittet.
Supernova Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 108

WinXP
D7 Prof
BeitragVerfasst: So 18.01.04 15:37 
Titel: .
PS:
Hab den Code nicht ausprobiert !! (Vielleicht funzt er Ja :-))))) )
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: So 18.01.04 19:27 
hä? TListView und Pfad ? was soll das sein ?
Grez
msch

_________________
ist das politisch, wenn ich linksdrehenden Joghurt haben möchte?
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Mo 19.01.04 17:51 
Ich verstehe auch nicht wirklich, was du willst.
Eine ListView kann Daten anzeigen. Die einzige mit einem Pfad ist die ShellListView.

ausblenden Delphi-Quelltext
1:
Label1.Caption := ShellListView1.SelectedFolder.PathName;					

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Di 20.01.04 09:36 
@Supernova: Bitte in Zukunft für zwei unterschiedliche Fragen auch zwei Topics in den richtigen Sparten erstellen. Hier gehts weiter: Wie kann ich einen neuen Ordner erstellen?

Gruß
Tino
Supernova Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 108

WinXP
D7 Prof
BeitragVerfasst: Fr 30.01.04 21:27 
Hab es versucht funzt aber irgendwie nicht.(Sturzt mir beim Start immer ab !!)
Was soll ich machen ?? :cry:
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Sa 31.01.04 08:40 
Bekommst du eine Fehlermeldung oder wird das Programm nicht sichtbar oder beendet es sich sofort?

Ein bischen mehr Informationen wären nicht schlecht, denn der Quellcode funktioniert.

In welches Ereignis hast du denn die Zeile eingefügt?

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Supernova Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 108

WinXP
D7 Prof
BeitragVerfasst: Sa 31.01.04 12:20 
Ich hab es auf Oncreate gesetzt ( Praktisch wenn die form gemacht wird )
Bei ShellListView hab ich onClick gesetzt funtz aber auch nicht.

Felehrmeldung:

irgendwas mit Unhandled Exception ???????
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Sa 31.01.04 14:29 
Also das einzig Vernünftige ist OnClick der ShellListView. Aber du musst aufpassen, dass du auch einen Ordner oder eine Datei erwischst, denn ansonsten bekommst du eine EAccessViolation.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Supernova Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 108

WinXP
D7 Prof
BeitragVerfasst: Sa 31.01.04 19:34 
Kann ich dass auch irgendwie anders machen (so dass er mir keine felermeldung anzeigt) ?

ausblenden Delphi-Quelltext
1:
ShellListView1.root(now);					
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: So 01.02.04 10:51 
Du kannst ein try-except Block drum herum schreiben.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Supernova Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 108

WinXP
D7 Prof
BeitragVerfasst: So 01.02.04 16:18 
Wie soll das gehen ?
:?:
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: So 01.02.04 18:26 
Ein Beispiel:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
try
  Label1.Caption := ShellListView1.SelectedFolder.PathName;
except
  raise Exception.Create('Fehler:  Kein Pfad gewählt');
end;

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Supernova Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 108

WinXP
D7 Prof
BeitragVerfasst: Di 03.02.04 19:02 
kann ich das nicht Irgendwie Umgehen ?
(Ich will so eine Art Speed-Commander machen - und da schaut des ja dann halt blöd aus)

_________________
Input - Output => Ganz Kaputt
*** MFG Supernova ***
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 03.02.04 20:38 
Ich kenne die ShellListView leider nicht. Aber bei der normalen LV ist es allgemein üblich, dass man einen Eintrag (wenn man darauf zugreifen möchte) prüft ob er nil ist - also nichts enthält. Auf die Weise umgeht man dort unschöne Fehlermeldungen. Etwas ähnliches gibt es unter Garantie sicher auch bei der Shell-LV. Einfach mal in der Hilfe nachschauen, welcher Typ
ausblenden Delphi-Quelltext
1:
ShellListView1.SelectedFolder					

ist. Ich könnte mir vorstellen, dass es evtl. so funktioniert:
ausblenden Delphi-Quelltext
1:
2:
if ShellListView1.SelectedFolder <> nil then
  Label1.Caption := ShellListView1.SelectedFolder.PathName;