Method: Tk::Listbox#value=
- Defined in:
- lib/tk/listbox.rb
#value=(vals) ⇒ Object
91 92 93 94 95 96 97 98 99 |
# File 'lib/tk/listbox.rb', line 91 def value=(vals) unless vals.kind_of?(Array) fail ArgumentError, 'an Array is expected' end tk_send_without_enc('delete', '0', 'end') tk_send_without_enc('insert', '0', *(vals.collect{|v| _get_eval_enc_str(v)})) vals end |