Ruby/Tk :: Opening a new window when selecting menu items

Thanks a ton guys, I got it working and am moving along. Heres the code that worked:

filemenu.add(‘command’, ‘label’=>“Blah”, ‘command’=>proc {
toplevelwindow = {
title "New window"

toplevelbutton = {
text "Close"
command proc { toplevelwindow.destroy }
}.place(‘x’=>10, ‘y’=>10)

I hope that this will help anyone trying to do this same thing with Ruby/Tk. By the way, I am also documenting all the stuff I learn and hope to one day put out a fairly complete guide/tutorial to Ruby/Tk. Agian, thanks for the help.



Sign-up for your own FREE Personalized E-mail at