From c6032f06e6fce39e120ee176ce03690b84b8de10 Mon Sep 17 00:00:00 2001 From: nagai Date: Sat, 2 Aug 2003 21:39:23 +0000 Subject: * add or modify some widget demo scripts * (bug fix) TkGrid failed to treat RELATIVE PLACEMENT git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/lib/tk.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ext/tk/lib') diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 78a869204..dcbaeea15 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -2729,9 +2729,15 @@ module TkGrid if args[-1].kind_of?(Hash) keys = args.pop end - wins = [widget.epath] + wins = [] + args.unshift(widget) for i in args - wins.push i.epath + case i + when '-', 'x', '^' # RELATIVE PLACEMENT + wins.push(i) + else + wins.push(i.epath) + end end tk_call "grid", 'configure', *(wins+hash_kv(keys)) end -- cgit