Method: Tk::BWidget::ButtonBox#index
- Defined in:
- lib/tkextlib/bwidget/buttonbox.rb
#index(idx) ⇒ Object
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/tkextlib/bwidget/buttonbox.rb', line 59 def index(idx) if idx.kind_of?(Tk::BWidget::Button) name = idx[:name] idx = name unless name.empty? end if idx.kind_of?(Tk::Button) idx = idx[:text] end number(tk_send('index', idx.to_s)) end |