From: Ferenc Engard Date: 2003-12-30T20:18:10+09:00 Subject: Re: TkRoot.new :width => 4, :height => 2 Hello, "Ara.T.Howard" wrote: > > can someone please tell me why the following does NOT produce a window half as > big as my screen? > > require 'tk' > > tkroot = TkRoot.new > > width = (tkroot.winfo_screenwidth * 0.5).to_i > height = (tkroot.winfo_screenheight * 0.5).to_i > > tklabel = TkLabel.new :text => 'foobar' > tklabel.pack :expand => true, :fill => 'both' > > tkroot.configure :width => width, :height => height > > Tk.mainloop > > a similar approach works fine with 'place' instead of pack. i tried > ':pack_propagate => false' in the call to 'TkRoot.new' - but that didn't work > either... Try ':pack_propagate => 0'. Ferenc