diff options
Diffstat (limited to 'ext/tk/lib/tkextlib/iwidgets/checkbox.rb')
-rw-r--r-- | ext/tk/lib/tkextlib/iwidgets/checkbox.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ext/tk/lib/tkextlib/iwidgets/checkbox.rb b/ext/tk/lib/tkextlib/iwidgets/checkbox.rb index 46ca389db2..7d2b41f806 100644 --- a/ext/tk/lib/tkextlib/iwidgets/checkbox.rb +++ b/ext/tk/lib/tkextlib/iwidgets/checkbox.rb @@ -85,12 +85,24 @@ class Tk::Iwidgets::Checkbox self end - def get(idx) - simplelist(tk_call(@path, 'get', index(idx))).collect{|id| + def get_tags + simplelist(tk_call_without_enc(@path, 'get')) + end + + def get_objs + simplelist(tk_call_without_enc(@path, 'get')).collect{|id| Tk::Itk::Component.id2obj(self, id) } end + def get(idx=nil) + if idx + bool(tk_call_without_enc(@path, 'get', index(idx))) + else + get_tags + end + end + def index(idx) number(tk_call(@path, 'index', tagid(idx))) end |