diff options
Diffstat (limited to 'ext/tk/lib/tkextlib/iwidgets/radiobox.rb')
-rw-r--r-- | ext/tk/lib/tkextlib/iwidgets/radiobox.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/tk/lib/tkextlib/iwidgets/radiobox.rb b/ext/tk/lib/tkextlib/iwidgets/radiobox.rb index dd96089ffa..84c15082d6 100644 --- a/ext/tk/lib/tkextlib/iwidgets/radiobox.rb +++ b/ext/tk/lib/tkextlib/iwidgets/radiobox.rb @@ -56,7 +56,9 @@ class Tk::Iwidgets::Radiobox 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)) @@ -93,7 +95,9 @@ class Tk::Iwidgets::Radiobox 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)) |