ExplorerListGadget Sort only the Date Modified Column

Just starting out? Need help? Post your questions and find answers here.
User avatar
VB6_to_PBx
Enthusiast
Enthusiast
Posts: 625
Joined: Mon May 09, 2011 9:36 am

ExplorerListGadget Sort only the Date Modified Column

Post by VB6_to_PBx »

ExplorerListGadget Sort only the Date Modified Column

for a Window's Application ,
how can i Sort only the Date Modified Column
to the latest Modified File ??

i'm needing the latest Modified File
to be listed 1st at the top of that Column .
 
PureBasic .... making tiny electrons do what you want !

"With every mistake we must surely be learning" - George Harrison
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4662
Joined: Sun Apr 12, 2009 6:27 am

Re: ExplorerListGadget Sort only the Date Modified Column

Post by RASHAD »

Hi

Code: Select all

OpenWindow(0, 0, 0, 600, 400, "ExplorerListGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ExplorerListGadget(0, 10, 10, 580, 380, "C:\*.*", #PB_Explorer_MultiSelect|#PB_Explorer_NoFolders |#PB_Explorer_NoSort)
  SetGadgetItemAttribute(0,0,#PB_Explorer_ColumnWidth,200,3)
  
  sort.NM_LISTVIEW
  sort\hdr\hwndFrom = GadgetID(0)
  sort\hdr\idFrom = 0
  sort\hdr\code = #LVN_COLUMNCLICK
  sort\iSubItem = 3 
  SendMessage_(WindowID(0), #WM_NOTIFY, 0, sort)
  SendMessage_(WindowID(0), #WM_NOTIFY, 0, sort) 

Repeat
  Select WaitWindowEvent()
    Case #PB_Event_CloseWindow
      Quit = 1
  EndSelect
Until Quit = 1

Egypt my love
User avatar
VB6_to_PBx
Enthusiast
Enthusiast
Posts: 625
Joined: Mon May 09, 2011 9:36 am

Re: ExplorerListGadget Sort only the Date Modified Column

Post by VB6_to_PBx »

RASHAD , awesome , works great !!!

the (2) back-to-back SendMessages does the Trick
SendMessage_(WindowID(0), #WM_NOTIFY, 0, sort)
SendMessage_(WindowID(0), #WM_NOTIFY, 0, sort)
 
PureBasic .... making tiny electrons do what you want !

"With every mistake we must surely be learning" - George Harrison
Post Reply