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