Autor Beitrag
lemming
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 470

Mac OS 10.3.1
Delphi 6 Pro, Kylix 3
BeitragVerfasst: Fr 23.04.04 13:15 
Wie kann ich im ShellListView nach einem ColumnClick wie z.B. auf Datum die Dateien nach Datum sortieren? Die Items mit Shelllistview.items.item[10].index := 9 verschieben geht nicht. Index ist schreibgeschützt. Löschen und neu erstellen geht auch nicht.

Gibts nen Trick?
mk2
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 72

WIN 2000
D4 Prof
BeitragVerfasst: Fr 23.04.04 14:04 
hm, kannst du nicht die position eines items so ändern:

Shelllistview.items[n]:=Shelllistview.items[m]

Item n kannst du dir vorher mit ner Pointer variable merken

zum sortieren brauchst du dann nur noch nen ordentlichen algorithmus, der von 0 bis items.count-1 läuft. bubble sort reicht bestimmt aus, wenn du nicht total viele items hast.

MfG mk2
lemming Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 470

Mac OS 10.3.1
Delphi 6 Pro, Kylix 3
BeitragVerfasst: Mo 26.04.04 07:34 
Gute Idee. Klappt aber leider nicht. Es passiert irgendwie gar nichts wenn ich versuche die Items auszutauschen. Auch mit Assign nicht. Eine andere Idee?