Set an image file into any button or get the current image object of a button.
Affecte un fichier image à un bouton ou récupère l'objet image en cours d'un bouton.
_button_ : ObjGtk : any button already created.
_file_ : P : read reference of the image filename. If _file_ is 'nil', the function returns its current image object. The image format can be all supported formats by GTK+. If the image is animated, the button will be animated.
Return : [ObjGtk ObjGtk] :
typeof button = ObjGtk;; typeof image = ObjGtk;; fun main()= _showconsole; let _gtkButtonImage _gtkButtonNewLabel _channel "New file" _checkpack "tests/2dgtk/test.gif" -> [but img] in // the button will be animated ( set button = but; set image = img; ...
Note : the image object can be reused to another context.