UI change icon button image
Hi, I am writing a UI that can have a user put in a row and column amount that is generated within the UI on the fly, then passing each new icon button into a function that assigns a task to it. The task is to then allow a dialog to open upon 'OnClick' that allows the user to select a required design to be assigned to that part of the grid. Once the design is chosen I want the icon button image to update to give a visual representation of that design i.e. a star, a hat, a bell etc.
Does anyone know how to update an image within an icon button?
I have tried all sorts with the likes of drawImage(), newImage() etc. but just no joy. Examples of some of the things I have tried below but can't seem to get it to work:
iconbutton1.image = iconbutton1.newImage(File.decode(iconbutton1_imgStringNEW));iconbutton1.graphics.drawImage(iconbutton1.image = newImage(File.decode(iconbutton1_imgStringNEW)),0,0);Any help would be greatly appreciated. Thanks in advance.
