Add columns to ExplorerListGadget?
-
- Enthusiast
- Posts: 429
- Joined: Sun Apr 06, 2008 12:54 pm
- Location: Brisbane, Qld, Australia
- Contact:
Add columns to ExplorerListGadget?
Is there a way to add columns other than the standard #PB _Explorer_... columns to an ExplorerListGadget (Windows only)? Specifically I want to add the 'Length' for audio files. 'Title' would also be useful.
Re: Add columns to ExplorerListGadget?
I know this topic is old, but I have the exact same question...
Re: Add columns to ExplorerListGadget?
Hi ozzie
Hi firace
Hi firace
Code: Select all
Procedure AddColumn(gad,index)
col.LVCOLUMN
col\mask = #LVCF_TEXT|#LVCF_WIDTH|#LVCF_FMT
col\fmt = #LVCFMT_CENTER
col\cx = 110
col\pszText = @"ozzie"
SendMessage_(GadgetID(gad), #LVM_INSERTCOLUMN, index, @col)
EndProcedure
Procedure DeleteColumn(gad,index)
SendMessage_(GadgetID(gad), #LVM_DELETECOLUMN, index, 0)
EndProcedure
If OpenWindow(0, 0, 0, 400, 200, "ExplorerListGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ExplorerListGadget(0, 10, 10, 380, 180, "*.*", #PB_Explorer_MultiSelect)
Header = SendMessage_(GadgetID(0), #LVM_GETHEADER, 0, 0)
ColCount = SendMessage_(Header, #HDM_GETITEMCOUNT, 0, 0)
AddColumn(0,ColCount)
DeleteColumn(0,3)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Egypt my love
-
- Enthusiast
- Posts: 429
- Joined: Sun Apr 06, 2008 12:54 pm
- Location: Brisbane, Qld, Australia
- Contact:
Re: Add columns to ExplorerListGadget?
Many thanks, RASHAD. You're a master of Windows functions like SendMessage_()!