delete(first, last=nil)
click to toggle source
def delete(first, last=nil)
if last
tk_call(@path, 'delete', first, last)
else
tk_call(@path, 'delete', first)
end
self
end
disable(idx)
click to toggle source
def disable(idx)
tk_call(@path, 'disable', idx)
self
end
enable(idx)
click to toggle source
def enable(idx)
tk_call(@path, 'enable', idx)
self
end
get(first=nil, last=nil)
click to toggle source
def get(first=nil, last=nil)
if last
simplelist(tk_call(@path, 'get', first, last))
elsif first
tk_call(@path, 'get', first)
else
tk_call(@path, 'get')
end
end
get_range(first, last)
click to toggle source
def get_range(first, last)
get(first, last)
end
get_selected()
click to toggle source
def get_selected
get()
end
index(idx)
click to toggle source
def index(idx)
number(tk_call(@path, 'index', idx))
end
insert(idx, *args)
click to toggle source
def insert(idx, *args)
tk_call(@path, 'insert', idx, *args)
self
end
select(idx)
click to toggle source
def select(idx)
tk_call(@path, 'select', idx)
self
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