PVGadgets_ChangeListIconImage (GadgetID.l,Row.l,Column.l,hIcon.l)
Previous  Top  Next

Change/assign an Icon to a specified Row/Column of an ListIconGadget.
 
Use:
PVGadgets_ChangeListIconImage(#List,5,2,InfoIcon)


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) ;changes row 3 column 1 to HelpIcon  
PVGadgets_ChangeListIconImage(#List,5,2,InfoIcon) ;changes row 5 column 2 to InfoIcon  

Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow  
EndIf