LOTS of Icons and Listboxes

BlitzMax Forums/BlitzMax Beginners Area/LOTS of Icons and Listboxes

target_pixmap.paste(source_pixmap,x,y)

P.S. Bmax read/writepixel is pretty fast.
<edit> Quick and dirty (obviously you can do it all in a single loop).
Graphics 640,480
Const maxgadgets=4
pix_target:TPixmap=CreatePixmap((maxgadgets)*32,32,PF_RGBA8888)
Local pix_source:TPixmap[4]
pix_source[0]=LoadPixmap("pix1.png")
pix_source[1]=LoadPixmap("pix2.png")
pix_source[2]=LoadPixmap("pix3.png")
pix_source[3]=LoadPixmap("pix4.png")
For x = 0 To maxgadgets-1
	pix_target.paste(pix_source[x],x*32,0)
Next
DrawPixmap pix_target,0,0
For x = 0 To maxgadgets-1
	DrawPixmap pix_source[x],x*32,32
Next

Flip
WaitKey()
Local MyWindow:TGadget=CreateWindow("ListBox Example", 200,200,320,240)
Local ListBox:TGadget=CreateListBox(10,10,200,100,MyWindow)

Local IconStrip:TIconStrip=LoadIconStrip(pix_target)
SetGadgetIconStrip(ListBox, IconStrip)

AddGadgetItem ListBox, "This is my first list item",0,1
AddGadgetItem ListBox, "This is my second list item",0,3

Repeat
  WaitEvent()
  Select EventID()
  Case EVENT_WINDOWCLOSE
     End
   End Select
Forever