PVGadgets_CreateListIconImageList (GadgetID.l)
Previous  Top  Next

Creates an ImageList to which Icons will be added for using in a ListIconGadget.
 
Use:
hImageList=PVGadgets_CreateListIconImageList(#Gadget)

Returns handle to the created ImageList to be used with PVGadgets_AddListIconImageList


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