PureLVSORT library : sorting ListIconGadgets (and more)

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Library update

- fixed : sorting process did reset the alignment to the left
- added : function PureLVSORT_SetUserIcons() [see example file n°3]
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Yet another library update (the last one I hope)

- changed : now I use CreateDIBitmap_() instead of CatchImage() so no more image library dependence (no chance to interfere with main program).

The locked column feature seems impossible to do, at least with LVM_SORTITEMS and the callback compare function. Sorry !
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Library update
- modified : help file is now CHM
- added : new function PureLVSORT_GetClickedColumn()
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Bonne_den_kule
Addict
Addict
Posts: 841
Joined: Mon Jun 07, 2004 7:10 pm

Post by Bonne_den_kule »

Can you make a function to detect which sorting direction a column is sorted with, and a function to sort after filesizes(f.exp: 15.02 MB, 5.98 GB 100 KB, 65 B)?

Great PB library.
Last edited by Bonne_den_kule on Wed May 18, 2005 3:34 pm, edited 1 time in total.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Bonne_den_kule wrote:Can you make a function to detect which sorting direction a column is sorted with, and a function to sort after filesizes(f.exp: 15.02 MB, 5.98 GB 100 KB, 65 B)?
I will see for the next version.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update
- new feature : new column type #PureLVSORT_FileSize for sorting file sizes (examples : "1.23 GB", "235.51 MB", "1021 KB")
- new function : PureLVSORT_SetColumnAlignment()
- new function : PureLVSORT_SetColumnWidth()
- new function : PureLVSORT_GetSortingDirection()
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Nice (again!) :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

exactly what i need, thanx.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Bonne_den_kule
Addict
Addict
Posts: 841
Joined: Mon Jun 07, 2004 7:10 pm

Post by Bonne_den_kule »

Thanks, all the functions I was asking for.
Very nice library.
Good job :P
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2137
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Post by Andre »

First time I tested your lib myself. Thanks for a great lib! :D

A question from me: is it possible to use the LVSort sorting process to automatically do the sorting also in an array/linkedlist, which is related to the #ListIcon?

Else I must re-built my linkedlist manually or search the whole list for matching items after the user has choosen an item of the ListIcon. Would be nice, if here would be a possibility to "sync" both processes. :wink:
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2137
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Post by Andre »

No one have an idea? :roll:

I thought, there is maybe a solution which can be integrated in the callback. But propably only gnozal can help because of his internal knowledge of the PureLVSORT lib. :D
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Andre wrote:A question from me: is it possible to use the LVSort sorting process to automatically do the sorting also in an array/linkedlist, which is related to the #ListIcon?
LVSort uses the #LVM_SORTITEMS message, so it directly sorts the gadget without knowing anything about arrays or linked lists.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

This stuff is just great

Post by Fangbeast »

Thanks Gnozal, you have no idea just how much help your library is. It just rocks!
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update

What's new :
- fixed a bug in date sorting (I was using PB date functions, wich don't work for older dates)
- some optimizations
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

hello gnozal,

i like the #PureLVSORT_DateDDMMYYYY flag.
i use it very very often but i need a little bit more powerful flag.

in fact, i need to display in a column a datetime like this :
DD/MM/YYYY HH:MM:SS or DD.MM.YY HH:MM

So is it possible to add DATETIME and TIME sorting ?

regards.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Post Reply