Prevent Header Sizing in a List Icon Gadget
Posted: Thu Oct 06, 2011 9:39 pm
Took me half an hour to find a way to implement this for my program... For those of you who think it cannot be done....
Code: Select all
Procedure WinCallback(hwnd, msg, wparam, lparam)
result = #PB_ProcessPureBasicEvents
Select msg
Case #WM_NOTIFY
*customdraw.NMHEADER = lparam
Select *customdraw\hdr\code
Case #HDN_ITEMCHANGING
Select GetParent_(*customdraw\hdr\hwndFrom)
Case GadgetID(your gadget pbid)
result = #True
;SendMessage_(GadgetID(your gadget pbid),#LVM_SETCOLUMNWIDTH,*customdraw\iItem,#LVSCW_AUTOSIZE)
EndSelect
EndSelect
EndSelect
ProcedureReturn result
EndProcedure