| Class | Tk::BWidget::ButtonBox |
| In: |
tk/lib/tkextlib/bwidget/buttonbox.rb
|
| Parent: | TkWindow |
| TkCommandNames | = | ['ButtonBox'.freeze].freeze |
| WidgetClassName | = | 'ButtonBox'.freeze |
# File tk/lib/tkextlib/bwidget/buttonbox.rb, line 41 def add(keys={}, &b) win = window(tk_send('add', *hash_kv(keys))) win.instance_eval(&b) if b win end
# File tk/lib/tkextlib/bwidget/buttonbox.rb, line 47 def delete(idx) tk_send('delete', tagid(idx)) self end
# File tk/lib/tkextlib/bwidget/buttonbox.rb, line 52 def index(idx) if idx.kind_of?(Tk::BWidget::Button) name = idx[:name] idx = name unless name.empty? end if idx.kind_of?(TkButton) idx = idx[:text] end number(tk_send('index', idx.to_s)) end
# File tk/lib/tkextlib/bwidget/buttonbox.rb, line 63 def insert(idx, keys={}, &b) win = window(tk_send('insert', tagid(idx), *hash_kv(keys))) win.instance_eval(&b) if b win end
# File tk/lib/tkextlib/bwidget/buttonbox.rb, line 69 def invoke(idx) tk_send('invoke', tagid(idx)) self end
# File tk/lib/tkextlib/bwidget/buttonbox.rb, line 74 def set_focus(idx) tk_send('setfocus', tagid(idx)) self end
ruby-doc.org is hosted and maintained by James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, Arizona. The site was created in 2002 as part of the Ruby Documentation Project to promote the Ruby language and to help other Ruby hackers.
Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.
For more information on the Ruby programming language, visit ruby-lang.org.
Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.