gmurray
1/20/2006 12:51:00 AM
> I recently started using Ruby and am using 1.8.2
(Using ruby 1.8.4)
There are examples in the ruby source code distribution that can be
invoked by:
ruby-1.8.4/ext/tk/sample/demos-en/widget
Then look for the spinboxes in the window that appears.
# -code begin
require 'tk'
berry = ['strawberry','blueberry','raspberry','huckleberry','mulberry']
r = TkRoot.new{
title "simple spin"
}
f = TkFrame.new(r)
s = TkSpinbox.new(f,
:values=>berry, :width=>12)
f.pack
s.pack('padx'=>30)
Tk.mainloop
# -code end
regards,
Gerald