activate(y)
click to toggle source
def activate(y)
tk_send_without_enc('activate', y)
self
end
bbox(index)
click to toggle source
def bbox(index)
list(tk_send_without_enc('bbox', index))
end
clear()
click to toggle source
def clear
tk_call(@path, 'clear')
self
end
curselection()
click to toggle source
def curselection
list(tk_send_without_enc('curselection'))
end
delete(first, last=None)
click to toggle source
def delete(first, last=None)
tk_send_without_enc('delete', first, last)
self
end
get(*index)
click to toggle source
def get(*index)
_fromUTF8(tk_send_without_enc('get', *index))
end
get_curselection()
click to toggle source
def get_curselection
tk_call(@path, 'getcurselection')
end
index(idx)
click to toggle source
def index(idx)
tk_send_without_enc('index', idx).to_i
end
insert(index, *args)
click to toggle source
def insert(index, *args)
tk_send('insert', index, *args)
self
end
justify(dir)
click to toggle source
def justify(dir)
tk_call(@path, 'justify', dir)
self
end
method_missing(id, *args)
click to toggle source
def method_missing(id, *args)
if @listbox.respond_to?(id)
@listbox.__send__(id, *args)
else
super(id, *args)
end
end
nearest(y)
click to toggle source
def nearest(y)
tk_send_without_enc('nearest', y).to_i
end
scan_dragto(x, y)
click to toggle source
def scan_dragto(x, y)
tk_send_without_enc('scan', 'dragto', x, y)
self
end
scan_mark(x, y)
click to toggle source
def scan_mark(x, y)
tk_send_without_enc('scan', 'mark', x, y)
self
end
see(index)
click to toggle source
def see(index)
tk_send_without_enc('see', index)
self
end
selected_item_count()
click to toggle source
def selected_item_count
number(tk_call(@path, 'selecteditemcount'))
end
selection_anchor(index)
click to toggle source
def selection_anchor(index)
tk_send_without_enc('selection', 'anchor', index)
self
end
selection_clear(first, last=None)
click to toggle source
def selection_clear(first, last=None)
tk_send_without_enc('selection', 'clear', first, last)
self
end
selection_includes(index)
click to toggle source
def selection_includes(index)
bool(tk_send_without_enc('selection', 'includes', index))
end
selection_set(first, last=None)
click to toggle source
def selection_set(first, last=None)
tk_send_without_enc('selection', 'set', first, last)
self
end
size()
click to toggle source
def size
tk_send_without_enc('size').to_i
end
sort(*params, &b)
click to toggle source
def sort(*params, &b)
if b
tk_call(@path, 'sort', '-command', proc(&b), *params)
else
tk_call(@path, 'sort', *params)
end
self
end
sort_ascending()
click to toggle source
def sort_ascending
tk_call(@path, 'sort', 'ascending')
self
end
sort_descending()
click to toggle source
def sort_descending
tk_call(@path, 'sort', 'descending')
self
end
xview(*index)
click to toggle source
def xview(*index)
if index.size == 0
list(tk_send_without_enc('xview'))
else
tk_send_without_enc('xview', *index)
self
end
end
xview_moveto(*index)
click to toggle source
def xview_moveto(*index)
xview('moveto', *index)
end
yview(*index)
click to toggle source
def yview(*index)
if index.size == 0
list(tk_send_without_enc('yview'))
else
tk_send_without_enc('yview', *index)
self
end
end
yview_moveto(*index)
click to toggle source
def yview_moveto(*index)
yview('moveto', *index)
end