Methods
- C
- D
- G
- H
- I
- K
- L
- N
- S
- T
Included Modules
Class Public methods
nearest(y)
Link
select_clear(first, last=nil)
Link
# File ext/tk/sample/tkmulticolumnlist.rb, line 130 def self.select_clear(first, last=nil) first = "#{first}.0" if first.kind_of?(Integer) first = self.index(first.to_s + ' linestart') last = first unless last last = "#{last}.0" if first.kind_of?(Integer) last = self.index(last.to_s + ' + 1 lines linestart') @seltag.remove(first, last) end
select_index()
Link
select_set(first, last=nil)
Link
# File ext/tk/sample/tkmulticolumnlist.rb, line 139 def self.select_set(first, last=nil) first = "#{first}.0" if first.kind_of?(Integer) first = self.index(first.to_s + ' linestart') last = first unless last last = "#{last}.0" if first.kind_of?(Integer) last = self.index(last.to_s + ' + 1 lines linestart') @seltag.add(first, last) end
Instance Public methods
columns(*indices)
Link
get listbox widgets
command(cmd)
Link
set command
delete(*idx)
Link
get(idx_s, idx_e=nil)
Link
# File ext/tk/sample/tkmulticolumnlist.rb, line 445 def get(idx_s, idx_e=nil) unless idx_e if idx_s.kind_of?(Integer) idx_s = "#{idx_s}.0" idx_e = "#{idx_s} lineend" else idx_s = idx_s.to_s idx_e = "#{idx_s} lineend" end @lbox_list.collect{|lbox| lbox.get(idx_s, idx_e) } else if idx_s.kind_of?(Integer) idx_s = "#{idx_s}.0" else idx_s = idx_s.to_s end if idx_e.kind_of?(Integer) idx_e = "#{idx_e}.end" else idx_e = "#{idx_e} lineend" end list = @lbox_list.collect{|lbox| lbox.get(idx_s, idx_e).split(/\n/)} result = [] list[0].each_with_index{|line, index| result << list.collect{|lines| lines[index]} } result end end
get_by_hash(*idx)
Link
get_select()
Link
hide_each_hscr()
Link
hide_win_hscr()
Link
insert(idx, *lines)
Link
# File ext/tk/sample/tkmulticolumnlist.rb, line 503 def insert(idx, *lines) lbox_ins = [] (0..@lbox_list.size).each{lbox_ins << []} if idx.kind_of?(Integer) idx = "#{idx}.0" else idx = idx.to_s end if @lbox_list[0].index('1.0 + 1 char') == @lbox_list[0].index('end') cr = "" else cr = "\n" end lines.each{|line| if line.kind_of? Hash array = [] @name_index.each_pair{|label, indices| if indices.size == 1 array[indices[0]] = line[label] else if line[label].kind_of? Array indices.each_with_index{|index, num| array[index] = line[label][num] } else array[indices[0]] = line[label] end end } line = array end @name_index.each_pair{|label, indices| if indices.size == 1 lbox_ins[indices[0]] << line[indices[0]] else indices.each{|index| lbox_ins[index] << line[index]} end } } @lbox_list.each_with_index{|lbox, index| lbox.insert(idx, cr + lbox_ins[index].join("\n")) if lbox_ins[index] } end
keep_minsize(bool)
Link
keep_minsize?()
Link
listboxborder(width)
Link
set listbox borders
listboxrelief(relief)
Link
set listbox relief
scrollbarborder(width)
Link
set scrollbar border
scrollbarwidth(width)
Link
set scrollbar width
select_clear(first, last=None)
Link
select_set(first, last=None)
Link
show_each_hscr()
Link
each hscr
show_win_hscr()
Link
window hscroll
titlebackground(bg)
Link
set title background color
titleborder(width)
Link
set title borders
titlecommand(idx, cmd=Proc.new)
Link
set title cmds
titlefont(font)
Link
set title font
# File ext/tk/sample/tkmulticolumnlist.rb, line 387 def titlefont(font) @title_list.each{|label| label['font'] = font} title_height = 0 @title_list.each{|w| h = w.winfo_reqheight title_height = h if title_height < h } @f_title.height title_height bbox = @w_title.bbox @c_title.height(bbox[3]) @c_title.scrollregion(bbox) self end
titleforeground(fg)
Link
set title foreground color
titleinvoke(idx)
Link
call title cmds