# File tk/lib/tk/listbox.rb, line 45
def activate(y)
tk_send_without_enc('activate', y)
self
end
# File tk/lib/tk/listbox.rb, line 100
def clear
tk_send_without_enc('delete', '0', 'end')
self
end
# File tk/lib/tk/listbox.rb, line 49
def curselection
list(tk_send_without_enc('curselection'))
end
# File tk/lib/tk/listbox.rb, line 52
def get(first, last=nil)
if last
# tk_split_simplelist(_fromUTF8(tk_send_without_enc('get', first, last)))
tk_split_simplelist(tk_send_without_enc('get', first, last), false, true)
else
_fromUTF8(tk_send_without_enc('get', first))
end
end
# File tk/lib/tk/listbox.rb, line 82
def index(idx)
tk_send_without_enc('index', idx).to_i
end
# File tk/lib/tk/listbox.rb, line 60
def nearest(y)
tk_send_without_enc('nearest', y).to_i
end
# File tk/lib/tk/listbox.rb, line 66
def selection_anchor(index)
tk_send_without_enc('selection', 'anchor', index)
self
end
# File tk/lib/tk/listbox.rb, line 70
def selection_clear(first, last=None)
tk_send_without_enc('selection', 'clear', first, last)
self
end
# File tk/lib/tk/listbox.rb, line 74
def selection_includes(index)
bool(tk_send_without_enc('selection', 'includes', index))
end
# File tk/lib/tk/listbox.rb, line 77
def selection_set(first, last=None)
tk_send_without_enc('selection', 'set', first, last)
self
end
# File tk/lib/tk/listbox.rb, line 63
def size
tk_send_without_enc('size').to_i
end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.