Purpose
Code: Select all
Automatically sorts listicon gadgets after a LVN_COLUMNCLICK event (click on column header) or a PureLVSORT_SortListIconNow() function call, and more...
PB4.xx : http://gnozal.ucoz.com/PureLVSORT_.htm
Example
Code: Select all
#Window_0 = 0
#ListIcon_0 = 0
Procedure Open_Window_0()
If OpenWindow(#Window_0, 216, 0, 602, 302, #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_ScreenCentered , "PureLVSORT Test")
If CreateGadgetList(WindowID())
ListIconGadget(#ListIcon_0, 5, 5, 590, 285, "String", 110)
AddGadgetColumn(#ListIcon_0, 1, "Numeric", 110)
AddGadgetColumn(#ListIcon_0, 2, "Float", 110)
AddGadgetColumn(#ListIcon_0, 3, "DateDDMMYYYY", 120)
AddGadgetColumn(#ListIcon_0, 4, "DateMMDDYYYY", 120)
AddGadgetItem(#ListIcon_0, -1, "ABCDE" + Chr(10) + "514" + Chr(10) + "0.9" + Chr(10) + "31/12/2004" + Chr(10) + "12/31/2004")
AddGadgetItem(#ListIcon_0, -1, "ACDEF" + Chr(10) + "118" + Chr(10) + "1.9" + Chr(10) + "11/12/2004" + Chr(10) + "12/11/2004")
AddGadgetItem(#ListIcon_0, -1, "ZABCD" + Chr(10) + "-414" + Chr(10) + "7.0" + Chr(10) + "21/01/2003" + Chr(10) + "01/21/2003")
AddGadgetItem(#ListIcon_0, -1, "DEFGH" + Chr(10) + "524" + Chr(10) + "900" + Chr(10) + "10/06/2001" + Chr(10) + "06/10/2001")
EndIf
EndIf
EndProcedure
Open_Window_0()
; ListIcon Sort Setup
If PureLVSORT_SelectGadgetToSort(#ListIcon_0, #PureLVSORT_ShowClickedHeader_Icon) = #PureLVSORT_Ok
PureLVSORT_SetColumnType(#ListIcon_0, 0, #PureLVSORT_String) ; default, not necessary
PureLVSORT_SetColumnType(#ListIcon_0, 1, #PureLVSORT_Numeric)
PureLVSORT_SetColumnType(#ListIcon_0, 2, #PureLVSORT_Float)
PureLVSORT_SetColumnType(#ListIcon_0, 3, #PureLVSORT_DateDDMMYYYY)
PureLVSORT_SetColumnType(#ListIcon_0, 4, #PureLVSORT_DateMMDDYYYY)
EndIf
;
Repeat
Event = WaitWindowEvent()
If EventType() = #PB_EventType_LeftDoubleClick
PureLVSORT_ClearGadget(#ListIcon_0)
EndIf
Until Event = #PB_EventCloseWindow
End
Only available for Purebasic Windows x86
PB3.94 : http://gnozal.ucoz.com/PureLVSORT.zip
PB4.0x : http://gnozal.ucoz.com/PureLVSORT_.zip
There are two versions in the archive : PureLVSORT (standard) and PureLVSORT-Plus ; the plus version adds some basic listicon editing functions.
PB4.1x : http://gnozal.ucoz.com/PureLVSORT__.zip
There are two versions in the archive : PureLVSORT (standard) and PureLVSORT-Plus ; the plus version adds some basic listicon editing functions.
PB4.2x : http://gnozal.ucoz.com/PureLVSORT___.zip
There are two versions in the archive : PureLVSORT (standard) and PureLVSORT-Plus ; the plus version adds some basic listicon editing functions.
PB4.3x : http://gnozal.ucoz.com/PureLVSORT_430.zip
There are two versions in the archive : PureLVSORT (standard) and PureLVSORT-Plus ; the plus version adds some basic listicon editing functions.
PB4.4x : http://gnozal.ucoz.com/PureLVSORT_440.zip
There are two versions in the archive : PureLVSORT (standard) and PureLVSORT-Plus ; the plus version adds some basic listicon editing functions.
PB4.5x : http://gnozal.ucoz.com/PureLVSORT_450.zip
There are two versions in the archive : PureLVSORT (standard) and PureLVSORT-Plus ; the plus version adds some basic listicon editing functions.
PB4.6x : http://gnozal.ucoz.com/PureLVSORT_460.zip
There are two versions in the archive : PureLVSORT (standard) and PureLVSORT-Plus ; the plus version adds some basic listicon editing functions.
PB5.0x : http://gnozal.ucoz.com/PureLVSORT_500.zip
There are two versions in the archive : PureLVSORT (standard) and PureLVSORT-Plus ; the plus version adds some basic listicon editing functions.
PB5.1x : http://gnozal.ucoz.com/PureLVSORT_510.zip
There are two versions in the archive : PureLVSORT (standard) and PureLVSORT-Plus ; the plus version adds some basic listicon editing functions.
Notes :
1. The PureLVSORT sorting functions are designed for a multicolumn gadget. If your listicongadget has only one column, add a zero length column or use the #LVS_SORT* styles.
2. PureLVSORT uses the Windows #LVM_SORTITEMS message to sort the listicongadget, and this implies using LV_ITEM\lParam (so the sorting is not compatible with Set/GetGadgetItemData(), or the other way round : the Purebasic listicongadget is not 100% Windows API compatible : it's not a simple SysListView32).
_________________
For tools, jaPBe plugins and libs, visit http://gnozal.ucoz.com/