From: Isaac Toothyxdip Date: 2008-02-23T12:07:02+09:00 Subject: Re: Ruby/Tk Morton Goldberg wrote: > Regards, Morton Thanks! this is really helpful it allows me to see how to do boarders and this is probably more of what i would use instead of input boxes but even though this is something that is very helpful i would also like to see how to do this with inputboxes. Like is there a way to have a number preset in the box and then when you press the button it adds one to it much like this just with an inputbox instead of a boarder. This is something else i tried but of course it didnt work require 'tk' hello = TkRoot.new do title "Hello World" # the min size of window minsize(400,400) end number = 1 def addnumber @text.value = number end @text = TkVariable.new lbl = TkEntry.new('textvariable' => @text) { justify 'center' pack('padx'=>5, 'pady'=>5, 'side' => 'top') } TkButton.new() { text "Add One" command proc {addnumber} pack('side'=>'right', 'padx'=>10, 'pady'=>10) } Tk.mainloop -- Posted via http://www.ruby-forum.com/.