> Ruby/Tk question for you all.
> 
> I was trying to add an image to a couple of buttons
> (following the _Learning Perl/Tk_ book) and tried
> this basic format (see below).
> 
> Trouble is, it doesn't seem to have heard of TkPhoto.
> I found a TkPhotoImage referred to in one of the *.rb
> files, but that didnt' work either.
> 
> Those who know Tk, does this generally look correct?
> 
> Hal
> 
> 
> # ...
> leftImg = TkPhoto("file"=>"left.gif")
> rightImg = TkPhoto("file"=>"right.gif")

It is really called TkPhotoImage; and you have to call new()
   image = TkPhotoImage.new("file" => "some.gif")

> TkButton.new(bottom) do
>   image leftImg
>   command proc { blah blah blah... }
>   pack $params
> end

What about TkButton.new(root)  # what bottom? pack('side' => 'bottom')
In general, do not forget the semicolons in between ``options'' of this block.

What lacks in your example is
  require 'tk'
in the beginning and
  Tk.mainloop
at the end. But I think you already knew that...

Bye,
Kero.

+--- Kero ------------------------------ kero / chello.nl ---+
|  Don't split your mentality without thinking twice       |
|                          Proud like a God -- Guano Apes  |
+--- M38c ------- http://members.chello.nl/~k.vangelder ---+