From: jkaurin Date: 2001-02-16T12:10:02+09:00 Subject: [ruby-talk:10944] Re: Ruby/Tk Grid Geometry Example Thanks everyone. Originally a case of a newbie trying to get too fancy with the code. I also worked through this when I went back to the basics. require "tk" mw = TkRoot.new mw.title("Change Password") f1 = TkFrame.new(mw, "borderwidth"=>2, "relief"=>"groove") TkLabel.new(f1, "text"=>"Old Password:" ).grid("column"=>0, "row"=>0, "sticky"=>"w") TkLabel.new(f1, "text"=>"New Password:" ).grid("column"=>0, "row"=>1, "sticky"=>"w") TkLabel.new(f1, "text"=>"New Password Again:").grid("column"=>0, "row"=>2, "sticky"=>"w") TkEntry.new(f1, "show"=>"*", "width"=>16).grid("column"=>1, "row"=>0, "sticky"=>"w") TkEntry.new(f1, "show"=>"*", "width"=>16).grid("column"=>1, "row"=>1, "sticky"=>"w") TkEntry.new(f1, "show"=>"*", "width"=>16).grid("column"=>1, "row"=>2, "sticky"=>"w") b1 = TkButton.new(mw, "command"=>"exit", "text"=>"OK" , "width"=>8) b2 = TkButton.new(mw, "command"=>"exit", "text"=>"Cancel", "width"=>8) f1.pack("padx"=>10, "pady"=>10) b1.pack("anchor"=>"e", "expand"=>1, "padx"=>5, "pady"=>10, "side"=>"left") b2.pack("anchor"=>"w", "expand"=>1, "padx"=>5, "pady"=>10, "side"=>"left") Tk.mainloop