summaryrefslogtreecommitdiff
path: root/ext/tk/lib
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-02 21:39:23 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-02 21:39:23 +0000
commitf820839f17c05b9e67388db44fa98c9e4cde3a17 (patch)
tree3d13ba78122dd8bdd42e1d92df44c9e880906dc1 /ext/tk/lib
parent2c225e77e0521f91477b0f470df0a788a199d3c1 (diff)
* add or modify some widget demo scripts
* (bug fix) TkGrid failed to treat RELATIVE PLACEMENT git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib')
-rw-r--r--ext/tk/lib/tk.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index 78a869204d..dcbaeea15c 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