ImageList.Item optimised compiler bug?

Erel

Administrator
Staff member
Licensed User
Thanks for pointing it.
However I'm still missing something.
This code seems to work fine when compiled:
B4X:
Sub App_Start
    Form1.Show
    a = "smiley.gif"
    ImageList1.Add(a)
    a = "btnhome.bmp"
    ImageList1.Item(0) = a
    form1.Image = ImageList1.Item(0)
End Sub
 

agraham

Expert
Licensed User
B4X:
Sub App_Start
    Form1.Show
    a = "smiley.gif"
    ImageList1.Add(a)
    a = "btnhome.bmp"
    ImageList1.Item(0) = a
    [COLOR="Red"]form1.Image [/COLOR]= ImageList1.Item(0)
End Sub
That works because Form.Image can convert a string filename to a bitmap using GetBitmapFromString, ImageLib.Drawer.DrawImage1 and ImageLibEx.DrawerEx.DrawImage won't so can't use an ImageList containing strings.

EDIT: Corrected the DrawIMage references.
 

Erel

Administrator
Staff member
Licensed User
Ok. Now I see it. The actual string is saved in the ImageList :signOops:

Will be fixed in the next version.
 
Top