[Gambas-user] Listview picture not showing...

Stephen Bungay sbungay at ...981...
Sat Feb 26 21:56:47 CET 2011


   This has undoubtedly been asked before.

GAMBAS 2.2

   I am trying to add an icon to the listview items, to that end this 
code snippet should do the trick;

Private SUB Initialize_Listview1()
   DIM Icon AS NEW Picture

   Icon.Load("/home/username/mypicture.png") ' This png file is 26x16 
and has a transparent background
   Listview1.Add("1","Entry 1", Icon)

END

   No errors generated, no picture appears in the listview. Examining 
the Icon object sees an hex value in Image and 0 width and 0 height.






More information about the User mailing list