Restored from previous forum. Originally posted by Fangbeast.
I can return individual items from a listview box by single or double clicking but I was wondering if there is any way to gather ALL of the items from the list for processing.
I assume that the list is a pseudo linked list and there is some way of addressing all of the elements?
Regards
Fangles
Gathering items from listview
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by fred.
. And if it's internally handled as a linked list (don't know) you will never add access.. Windows is smart enough (!) to hide all its internal routine for the programmer.
Fred - AlphaSND
Why not trying a loop with GetGadgetText(x) ? Just a toughI can return individual items from a listview box by single or double clicking but I was wondering if there is any way to gather ALL of the items from the list for processing.
I assume that the list is a pseudo linked list and there is some way of addressing all of the elements?

Fred - AlphaSND
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Fangbeast.

[/quote]
Procedure CopyMatches(CopyTo$)
Shared Counter
For CopyStart = 1 To Counter
SetGadgetState(7, CopyStart)
Temporary$ = GetGadgetText(7)
FileName$ = GetFilePart(Temporary$)
NewName$ = CopyTo$ + FileName$
If RenameFile(Temporary$, NewName$)
EndIf
Next CopyStart
EndProcedure
Okay, this works fine to copy files out of the list, fun to watch too
Fangles
Hmm, give me a few moments, cross your fingers, eyes legs and I'll see if I can do itWhy not trying a loop with GetGadgetText(x) ? Just a tough. Fred - AlphaSND

[/quote]
Procedure CopyMatches(CopyTo$)
Shared Counter
For CopyStart = 1 To Counter
SetGadgetState(7, CopyStart)
Temporary$ = GetGadgetText(7)
FileName$ = GetFilePart(Temporary$)
NewName$ = CopyTo$ + FileName$
If RenameFile(Temporary$, NewName$)
EndIf
Next CopyStart
EndProcedure
Okay, this works fine to copy files out of the list, fun to watch too

Fangles