Get and Set ListIcon Headers
Posted: Mon Dec 15, 2003 12:18 am
Code updated for 5.20+
Many thanks to Danilo!
Many thanks to Danilo!
Code: Select all
; Structure LVCOLUMN
; mask.l
; fmt.l
; cx.l
; pszText.s
; cchTextMax.l
; iSubItem.l
; iImage.l
; iOrder.l
; EndStructure
Procedure SetListIconColumnText(Gadget,index,HeaderText.s)
lvc.LVCOLUMN
lvc\mask = #LVCF_TEXT
lvc\pszText = @HeaderText
SendMessage_(GadgetID(Gadget),#LVM_SETCOLUMN,index,@lvc)
EndProcedure
Procedure.s GetListIconColumnText(Gadget,index)
Protected.s TempString ; temporary string for spaces
lvc.LVCOLUMN
lvc\mask = #LVCF_TEXT
TempString = Space(255)
lvc\pszText = @TempString
lvc\cchTextMax = 255
SendMessage_(GadgetID(Gadget),#LVM_GETCOLUMN,index,@lvc)
ProcedureReturn PeekS(lvc\pszText)
EndProcedure