PVGadgets_AddListIconImageList (hImageList.l,hImageID.l)
Previous  Top  Next

Add an Icon to an ImageList.
 
Use:
ImageID=PVGadgets_AddListIconImageList(hImageList,hImage)

Returns an ImageID to be used with PVGadgets_ChangeListIconImage


Example:

#Main=0
#List=1

If OpenWindow(#Main,0,0,400,300,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"")
 
ListIconGadget(#List,0,0,400,300,"Column 1",150,#PB_ListIcon_GridLines|#PB_ListIcon_FullRowSelect)  
AddGadgetColumn(#List,1,"Column 2",100)  
AddGadgetColumn(#List,2,"Column 3",100)  
 

For tmp=0 To 20  
AddGadgetItem(#List,-1,"A_"+Str(tmp)+Chr(10)+"B_"+Str(tmp)+Chr(10)+"C_"+Str(tmp))  
Next  
 
hImageList=PVGadgets_CreateListIconImageList(#List)  
HelpIcon=PVGadgets_AddListIconImageList(hImageList,LoadImage(0,"help.ico"))  
InfoIcon=PVGadgets_AddListIconImageList(hImageList,LoadImage(1,"info.ico"))  
 
PVGadgets_ChangeListIconImage(#List,3,1,HelpIcon)  
PVGadgets_ChangeListIconImage(#List,5,2,InfoIcon)  

Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow  
EndIf