diff options
Diffstat (limited to 'ext/tk/lib/tkextlib/iwidgets/buttonbox.rb')
-rw-r--r-- | ext/tk/lib/tkextlib/iwidgets/buttonbox.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/tk/lib/tkextlib/iwidgets/buttonbox.rb b/ext/tk/lib/tkextlib/iwidgets/buttonbox.rb index 5ca48ed22..1ff190b9f 100644 --- a/ext/tk/lib/tkextlib/iwidgets/buttonbox.rb +++ b/ext/tk/lib/tkextlib/iwidgets/buttonbox.rb @@ -56,7 +56,9 @@ class Tk::Iwidgets::Buttonbox keys = tag tag = nil end - unless tag + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else tag = Tk::Itk::Component.new(self) end tk_call(@path, 'add', tagid(tag), *hash_kv(keys)) @@ -87,7 +89,9 @@ class Tk::Iwidgets::Buttonbox keys = tag tag = nil end - unless tag + if tag + tag = Tk::Itk::Component.new(self, tagid(tag)) + else tag = Tk::Itk::Component.new(self) end tk_call(@path, 'insert', index(idx), tagid(tag), *hash_kv(keys)) |