Thanks Gabriel
Please create a TkPhotoImage object and 'image' option of button widgets.
For example,
-------------------------------------
img = TkPhotoImage.new(:file=>your_image_file_name)
btn = TkButton.new(base, :image=>img).pack
-------------------------------------
See the Ruby/Tk WidgetDemo (ext/tk/sample/demos-en/widget on a Ruby
source). It includes examples of label widgets with a image.
TkButton class is a subclass of TkLabel.
So, same ways are available for button widgets.
Standard Tcl/Tk can support only GIF and PPM/PGM formats.
If you want to use other formats (BMP, JPEG, PNG, and so on),
you must use TkImg extention (ActiveTcl package includes TkImg extension).
When "require 'tkextlib/tkimg'" returns true,
your Ruby/Tk (Tcl/Tk) has TkImg extension.
Otherwise, you must install TkImg extension for your *Tcl/Tk*
libraries which used by Ruby/Tk.
--
Hidetoshi NAGAI (na...@ai.kyutech.ac.jp)