Page 1 of 1

Method to sort ListIconGadget

Posted: Sat Jul 19, 2008 1:10 pm
by superjacent
Ok, I'm populating a ListIconGadget with a list of files from a directory. The intention being to batch rename the files. An obvious option is to sort the files by name or date etc. prior to passing the files through a rename procedure.

It's the sorting bit that I'm stumbling on. What are my options here? Do I have to use a corresponding array, sort that array and pass the data back to the ListIconGadget.

Any help appreciated.

Posted: Sat Jul 19, 2008 1:17 pm
by srod
ListIcons (WIndows only) can be told to sort the items based upon a callback procedure which you provide. It is quite simple and there's plenty of code in the forums to help out (make sure it's PB 4 compatible in this case though!)

Alternatively, have a look at Gnozal's PureLVSort library.