From: Julian Schnidder Date: 2007-04-02T19:03:16+09:00 Subject: Re: Combo boxes in Ruby-Tk Hi! In Brent B. Welsh's book "Practical Programming in Tcl and Tk" 4th ed. the index redirects "combobox" to "spinbox" (new in Tcl/Tk version 8.4 IIRC): require 'tk' TkSpinbox.new do from -2 to 2 pack end TkSpinbox.new do from -2 to 2 increment 0.1 pack end TkSpinbox.new do @states=["Arizona", "California", "New Mexico"] values @states wrap 1 pack end TkButton.new do text "Quit" command "exit" pack end Tk.mainloop Hope, that helps. Julian Am 02.04.2007 um 10:55 schrieb Rosalind Mitchell: > Rosalind Mitchell wrote: > >> I'm a newcomer to Ruby, though a seasoned campaigner in Perl, and I'm >> finding my feet, so please be nice! >> >> I've been playing around with the Tk extension. The section on >> Ruby Tk in >> the pickaxe book is sketchy to say the least. I do have a well- >> thumbed >> copy of Learning Perl/Tk, so I know my way around the basics. >> >> My question is: is there any way in Ruby Tk to implement combo >> boxes? >> Neither BrowseEdit nor JComboBox seem to work. >> >> Rosie > > I'm a little surprised that nobody managed to come up with an > answer to > this. > > Is Tk really a hopeless case with Ruby? If it is, what alternative > GUI > manager would you suggest? > > Rosie > > >