class Tk::BWidget::ListBox
Constants
- TkCommandNames
- WidgetClassName
Public Instance Methods
delete(*args)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 118 def delete(*args) tk_send('delete', *args) self end
edit(item, text, *args)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 123 def edit(item, text, *args) tk_send('edit', tagid(item), text, *args) self end
exist?(item)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 128 def exist?(item) bool(tk_send('exists', tagid(item))) end
get_item(idx)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 141 def get_item(idx) tk_send('items', idx) end
imagebind(context, *args, &block)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 52 def imagebind(context, *args, &block) #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) if TkComm._callback_entry?(args[0]) || !block cmd = args.shift else cmd = block end _bind_for_event_class(Event_for_Items, [path, 'bindImage'], context, cmd, *args) self end
imagebind_append(context, *args, &block)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 64 def imagebind_append(context, *args, &block) #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) if TkComm._callback_entry?(args[0]) || !block cmd = args.shift else cmd = block end _bind_append_for_event_class(Event_for_Items, [path, 'bindImage'], context, cmd, *args) self end
imagebind_remove(*args)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 76 def imagebind_remove(*args) _bind_remove_for_event_class(Event_for_Items, [path, 'bindImage'], *args) self end
imagebindinfo(*args)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 81 def imagebindinfo(*args) _bindinfo_for_event_class(Event_for_Items, [path, 'bindImage'], *args) end
index(item)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 132 def index(item) num_or_str(tk_send('index', tagid(item))) end
insert(idx, item, keys={})
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 136 def insert(idx, item, keys={}) tk_send('insert', idx, tagid(item), *hash_kv(keys)) self end
items(first=None, last=None)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 145 def items(first=None, last=None) list(tk_send('items', first, last)) end
move(item, idx)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 149 def move(item, idx) tk_send('move', tagid(item), idx) self end
reorder(neworder)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 154 def reorder(neworder) tk_send('reorder', neworder) self end
see(item)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 159 def see(item) tk_send('see', tagid(item)) self end
selection_add(*args)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 175 def selection_add(*args) tk_send_without_enc('selection', 'add', *(args.collect{|item| tagid(item)})) self end
selection_clear()
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 164 def selection_clear tk_send_without_enc('selection', 'clear') self end
selection_get(*args)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 187 def selection_get(*args) simplelist(tk_send_without_enc('selection', 'get')).collect{|item| Tk::BWidget::ListBox::Item.id2obj(self, item) } end
selection_remove(*args)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 181 def selection_remove(*args) tk_send_without_enc('selection', 'remove', *(args.collect{|item| tagid(item)})) self end
selection_set(*args)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 169 def selection_set(*args) tk_send_without_enc('selection', 'set', *(args.collect{|item| tagid(item)})) self end
tagid(tag)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 43 def tagid(tag) if tag.kind_of?(Tk::BWidget::ListBox::Item) tag.id else # tag _get_eval_string(tag) end end
textbind(context, *args, &block)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 85 def textbind(context, *args, &block) #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) if TkComm._callback_entry?(args[0]) || !block cmd = args.shift else cmd = block end _bind_for_event_class(Event_for_Items, [path, 'bindText'], context, cmd, *args) self end
textbind_append(context, *args, &block)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 97 def textbind_append(context, *args, &block) #if args[0].kind_of?(Proc) || args[0].kind_of?(Method) if TkComm._callback_entry?(args[0]) || !block cmd = args.shift else cmd = block end _bind_append_for_event_class(Event_for_Items, [path, 'bindText'], context, cmd, *args) self end
textbind_remove(*args)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 109 def textbind_remove(*args) _bind_remove_for_event_class(Event_for_Items, [path, 'bindText'], *args) self end
textbindinfo(*args)
click to toggle source
# File lib/tkextlib/bwidget/listbox.rb, line 114 def textbindinfo(*args) _bindinfo_for_event_class(Event_for_Items, [path, 'bindText'], *args) end
Private Instance Methods
__boolval_optkeys()
click to toggle source
Calls superclass method
TkConfigMethod#__boolval_optkeys
# File lib/tkextlib/bwidget/listbox.rb, line 38 def __boolval_optkeys super() << 'autofocus' << 'dragenabled' << 'dropenabled' << 'selectfill' end