Page 1 of 1

Get and Set ListIcon Headers

Posted: Mon Dec 15, 2003 12:18 am
by Karbon
Code updated for 5.20+

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

Posted: Mon Dec 15, 2003 12:31 am
by Kale

Posted: Mon Dec 15, 2003 12:35 am
by Karbon
Yep, there is a little bug in that lib that I've been trying to help Denis track down. It's not fixed yet but I'm sure it will be soon!

Posted: Tue Dec 16, 2003 1:34 pm
by Denis
Hi Karbon

did you still have a bug under XP pro ?
As i tell you, it's working well with Win98 and XP home edition on my PC.
But i will continue to try to understand what's wrong. :wink:


Denis

Posted: Wed Dec 17, 2003 3:36 pm
by Karbon
Hey Denis, I just got back into town and will be testing the new lib in a few minutes! I'll drop you an email with the results!

Thanks!