Class | Tk::Tcllib::Tablelist
In: | tk/lib/tkextlib/tcllib/tablelist_core.rb
Parent: | TkWindow

### Methods

activate activate_cell activatecell bbox bodypath bodytag cancel_editing cancelediting cellindex cellselection_anchor cellselection_clear cellselection_includes cellselection_set columncount columnindex containing containing_cell containing_column containingcell containingcolumn curcellselection curselection delete delete_columns delete_items deletecolumns deleteitems edit_cell editcell editwinpath entrypath fill_column fillcolumn finish_editing finishediting get get_attrib get_cells get_columns get_keys getcells getcolumns getkeys imagelabelpath index insert insert_columnlist insert_columns insert_list insertcolumnlist insertcolumns insertlist itemlistvar labelpath labels move move_column movecolumn nearest nearest_cell nearest_column nearestcell nearestcolumn package_name package_version reject_input rejectinput reset_sortinfo resetsortinfo scan_dragto scan_mark see see_cell see_column seecell seecolumn selection_anchor selection_clear selection_includes selection_set separatorpath separators set_attrib size sort sort_by_column sort_by_column_decreasing sort_by_column_increasing sort_decreasing sort_increasing sortcolumn sortorder toggle_visibility togglevisibility use_Tile? windowpath

### Included Modules

Tk::Tcllib::TablelistItemConfig Scrollable

### Constants

PACKAGE_NAME | = | 'Tablelist_tile'.freeze
PACKAGE_NAME | = | 'Tablelist'.freeze
TkCommandNames | = | ['::tablelist::tablelist'.freeze].freeze
WidgetClassName | = | 'Tablelist'.freeze
DEFAULT_sortByColumn_cmd | = | '::tablelist::sortByColumn'

### Public Class methods

package_name()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 19
          def self.package_name
            PACKAGE_NAME
          end

package_version()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 23
          def self.package_version
            begin
              TkPackage.require(self.package_name)
            rescue
              ''
            end
          end

use_Tile?()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 31
          def self.use_Tile?
            (Tk::Tcllib::Tablelist_usingTile)? true: false
          end

### Public Instance methods

activate(index)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 231
      def activate(index)
        tk_send('activate', _to_idx(index))
        self
      end

activate_cell(index)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 236
      def activate_cell(index)
        tk_send('activatecell', _to_idx(index))
        self
      end

activatecell(index)

Alias for activate_cell

bbox(index)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 259
      def bbox(index)
        list(tk_send('bbox', _to_idx(index)))
      end

bodypath()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 263
      def bodypath
        window(tk_send('bodypath'))
      end

bodytag()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 267
      def bodytag
        TkBindTag.new_by_name(tk_send('bodytag'))
      end

cancel_editing()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 271
      def cancel_editing
        tk_send('cancelediting')
        self
      end

cancelediting()

Alias for cancel_editing

cellindex(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 277
      def cellindex(idx)
        _from_idx(tk_send('cellindex', _to_idx(idx)))
      end

cellselection_anchor(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 281
      def cellselection_anchor(idx)
        tk_send('cellselection', 'anchor', _to_idx(idx))
        self
      end

cellselection_clear(first, last=nil)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 286
      def cellselection_clear(first, last=nil)
        if first.kind_of?(Array)
          tk_send('cellselection', 'clear', first.collect{|idx| _to_idx(idx)})
        else
          first = _to_idx(first)
          last = (last)? _to_idx(last): first
          tk_send('cellselection', 'clear', first, last)
        end
        self
      end

cellselection_includes(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 297
      def cellselection_includes(idx)
        bool(tk_send('cellselection', 'includes', _to_idx(idx)))
      end

cellselection_set(first, last=nil)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 301
      def cellselection_set(first, last=nil)
        if first.kind_of?(Array)
          tk_send('cellselection', 'set', first.collect{|idx| _to_idx(idx)})
        else
          first = _to_idx(first)
          last = (last)? _to_idx(last): first
          tk_send('cellselection', 'set', first, last)
        end
        self
      end

columncount()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 312
      def columncount
        number(tk_send('columncount'))
      end

columnindex(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 316
      def columnindex(idx)
        number(tk_send('columnindex', _to_idx(idx)))
      end

containing(y)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 320
      def containing(y)
        idx = num_or_str(tk_send('containing', y))
        (idx.kind_of?(Fixnum) && idx < 0)?  nil: idx
      end

containing_cell(x, y)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 325
      def containing_cell(x, y)
        idx = _from_idx(tk_send('containingcell', x, y))
        if idx.kind_of?(Array)
          [
            ((idx[0].kind_of?(Fixnum) && idx[0] < 0)?  nil: idx[0]),
            ((idx[1].kind_of?(Fixnum) && idx[1] < 0)?  nil: idx[1])
          ]
        else
          idx
        end
      end

containing_column(x)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 338
      def containing_column(x)
        idx = num_or_str(tk_send('containingcolumn', x))
        (idx.kind_of?(Fixnum) && idx < 0)?  nil: idx
      end

containingcell(x, y)

Alias for containing_cell

containingcolumn(x)

Alias for containing_column

curcellselection()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 344
      def curcellselection
        simplelist(tk_send('curcellselection')).collect!{|idx| _from_idx(idx)}
      end

curselection()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 348
      def curselection
        list(tk_send('curselection'))
      end

delete(first, last=nil)

Alias for delete_items

delete_columns(first, last=nil)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 365
      def delete_columns(first, last=nil)
        if first.kind_of?(Array)
          tk_send('deletecolumns', first.collect{|idx| _to_idx(idx)})
        else
          first = _to_idx(first)
          last = (last)? _to_idx(last): first
          tk_send('deletecolumns', first, last)
        end
        self
      end

delete_items(first, last=nil)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 352
      def delete_items(first, last=nil)
        if first.kind_of?(Array)
          tk_send('delete', first.collect{|idx| _to_idx(idx)})
        else
          first = _to_idx(first)
          last = (last)? _to_idx(last): first
          tk_send('delete', first, last)
        end
        self
      end

deletecolumns(first, last=nil)

Alias for delete_columns

deleteitems(first, last=nil)

Alias for delete_items

edit_cell(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 377
      def edit_cell(idx)
        tk_send('editcell', _to_idx(idx))
        self
      end

editcell(idx)

Alias for edit_cell

editwinpath()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 383
      def editwinpath
        window(tk_send('editwinpath'))
      end

entrypath()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 387
      def entrypath
        window(tk_send('entrypath'))
      end

fill_column(idx, txt)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 391
      def fill_column(idx, txt)
        tk_send('fillcolumn', _to_idx(idx), txt)
        self
      end

fillcolumn(idx, txt)

Alias for fill_column

finish_editing()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 397
      def finish_editing
        tk_send('finishediting')
        self
      end

finishediting()

Alias for finish_editing

get(first, last=nil)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 403
      def get(first, last=nil)
        if first.kind_of?(Array)
          simplelist(tk_send('get', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) }
        else
          first = _to_idx(first)
          last = (last)? _to_idx(last): first
          simplelist(tk_send('get', first, last))
        end
      end

get_attrib(name=nil)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 242
      def get_attrib(name=nil)
        if name && name != None
          tk_send('attrib', name)
        else
          ret = []
          lst = simplelist(tk_send('attrib'))
          until lst.empty?
            ret << ( [lst.shift] << lst.shift )
          end
          ret
        end
      end

get_cells(first, last=nil)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 413
      def get_cells(first, last=nil)
        if first.kind_of?(Array)
          simplelist(tk_send('getcells', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) }
        else
          first = _to_idx(first)
          last = (last)? _to_idx(last): first
          simplelist(tk_send('getcells', first, last))
        end
      end

get_columns(first, last=nil)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 424
      def get_columns(first, last=nil)
        if first.kind_of?(Array)
          simplelist(tk_send('getcolumns', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) }
        else
          first = _to_idx(first)
          last = (last)? _to_idx(last): first
          simplelist(tk_send('getcolumns', first, last))
        end
      end

get_keys(first, last=nil)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 435
      def get_keys(first, last=nil)
        if first.kind_of?(Array)
          simplelist(tk_send('getkeys', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) }
        else
          first = _to_idx(first)
          last = (last)? _to_idx(last): first
          simplelist(tk_send('getkeys', first, last))
        end
      end

getcells(first, last=nil)

Alias for get_cells

getcolumns(first, last=nil)

Alias for get_columns

getkeys(first, last=nil)

Alias for get_keys

imagelabelpath(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 446
      def imagelabelpath(idx)
        window(tk_send('imagelabelpath', _to_idx(idx)))
      end

index(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 450
      def index(idx)
        number(tk_send('index', _to_idx(idx)))
      end

insert(idx, *items)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 454
      def insert(idx, *items)
        tk_send('insert', _to_idx(idx), *items)
        self
      end

insert_columnlist(idx, columnlist)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 459
      def insert_columnlist(idx, columnlist)
        tk_send('insertcolumnlist', _to_idx(idx), columnlist)
        self
      end

insert_columns(idx, *args)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 465
      def insert_columns(idx, *args)
        tk_send('insertcolums', _to_idx(idx), *args)
        self
      end

insert_list(idx, list)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 471
      def insert_list(idx, list)
        tk_send('insertlist', _to_idx(idx), list)
        self
      end

insertcolumnlist(idx, columnlist)

Alias for insert_columnlist

insertcolumns(idx, *args)

Alias for insert_columns

insertlist(idx, list)

Alias for insert_list

itemlistvar()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 477
      def itemlistvar
        TkVarAccess.new(tk_send('itemlistvar'))
      end

labelpath(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 481
      def labelpath(idx)
        window(tk_send('labelpath', _to_idx(idx)))
      end

labels()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 485
      def labels
        simplelist(tk_send('labels'))
      end

move(src, target)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 489
      def move(src, target)
        tk_send('move', _to_idx(src), _to_idx(target))
        self
      end

move_column(src, target)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 494
      def move_column(src, target)
        tk_send('movecolumn', _to_idx(src), _to_idx(target))
        self
      end

movecolumn(src, target)

Alias for move_column

nearest(y)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 500
      def nearest(y)
        _from_idx(tk_send('nearest', y))
      end

nearest_cell(x, y)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 504
      def nearest_cell(x, y)
        _from_idx(tk_send('nearestcell', x, y))
      end

nearest_column(x)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 509
      def nearest_column(x)
        _from_idx(tk_send('nearestcolumn', x))
      end

nearestcell(x, y)

Alias for nearest_cell

nearestcolumn(x)

Alias for nearest_column

reject_input()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 514
      def reject_input
        tk_send('rejectinput')
        self
      end

rejectinput()

Alias for reject_input

reset_sortinfo()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 520
      def reset_sortinfo
        tk_send('resetsortinfo')
        self
      end

resetsortinfo()

Alias for reset_sortinfo

scan_dragto(x, y)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 531
      def scan_dragto(x, y)
        tk_send('scan', 'dragto', x, y)
        self
      end

scan_mark(x, y)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 526
      def scan_mark(x, y)
        tk_send('scan', 'mark', x, y)
        self
      end

see(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 536
      def see(idx)
        tk_send('see', _to_idx(idx))
        self
      end

see_cell(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 541
      def see_cell(idx)
        tk_send('seecell', _to_idx(idx))
        self
      end

see_column(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 547
      def see_column(idx)
        tk_send('seecolumn', _to_idx(idx))
        self
      end

seecell(idx)

Alias for see_cell

seecolumn(idx)

Alias for see_column

selection_anchor(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 553
      def selection_anchor(idx)
        tk_send('selection', 'anchor', _to_idx(idx))
        self
      end

selection_clear(first, last=nil)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 558
      def selection_clear(first, last=nil)
        if first.kind_of?(Array)
          tk_send('selection', 'clear', first.collect{|idx| _to_idx(idx)})
        else
          first = _to_idx(first)
          last = (last)? _to_idx(last): first
          tk_send('selection', 'clear', first, last)
        end
        self
      end

selection_includes(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 569
      def selection_includes(idx)
        bool(tk_send('selection', 'includes', _to_idx(idx)))
      end

selection_set(first, last=nil)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 573
      def selection_set(first, last=nil)
        if first.kind_of?(Array)
          tk_send('selection', 'set', first.collect{|idx| _to_idx(idx)})
        else
          first = _to_idx(first)
          last = (last)? _to_idx(last): first
          tk_send('selection', 'set', first, last)
        end
        self
      end

separatorpath(idx=nil)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 584
      def separatorpath(idx=nil)
        if idx
          window(tk_send('separatorpath', _to_idx(idx)))
        else
          window(tk_send('separatorpath'))
        end
      end

separators()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 592
      def separators
        simplelist(tk_send('separators')).collect!{|w| window(w)}
      end

set_attrib(*args)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 254
      def set_attrib(*args)
        tk_send('attrib', *(args.flatten))
        self
      end

size()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 596
      def size
        number(tk_send('size'))
      end

sort(order=nil)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 600
      def sort(order=nil)
        if order
          order = order.to_s
          order = '-' << order if order[0] != ?-
          if order.length < 2
            order = nil
          end
        end
        if order
          tk_send('sort', order)
        else
          tk_send('sort')
        end
        self
      end

sort_by_column(idx, order=nil)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 626
      def sort_by_column(idx, order=nil)
        if order
          order = order.to_s
          order = '-' << order if order[0] != ?-
          if order.length < 2
            order = nil
          end
        end
        if order
          tk_send('sortbycolumn', _to_idx(idx), order)
        else
          tk_send('sortbycolumn', _to_idx(idx))
        end
        self
      end

sort_by_column_decreasing(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 645
      def sort_by_column_decreasing(idx)
        tk_send('sortbycolumn', _to_idx(idx), '-decreasing')
        self
      end

sort_by_column_increasing(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 641
      def sort_by_column_increasing(idx)
        tk_send('sortbycolumn', _to_idx(idx), '-increasing')
        self
      end

sort_decreasing()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 619
      def sort_decreasing
        tk_send('sort', '-decreasing')
        self
      end

sort_increasing()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 615
      def sort_increasing
        tk_send('sort', '-increasing')
        self
      end

sortcolumn()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 650
      def sortcolumn
        idx = num_or_str(tk_send('sortcolum'))
        (idx.kind_of?(Fixnum) && idx < 0)?  nil: idx
      end

sortorder()

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 655
      def sortorder
        tk_send('sortorder')
      end

toggle_visibility(first, last=nil)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 659
      def toggle_visibility(first, last=nil)
        if first.kind_of?(Array)
          tk_send('togglevisibility', first.collect{|idx| _to_idx(idx)})
        else
          first = _to_idx(first)
          last = (last)? _to_idx(last): first
          tk_send('togglevisibility', first, last)
        end
        self
      end

togglevisibility(first, last=nil)

Alias for toggle_visibility

windowpath(idx)

[Source]

    # File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 671
      def windowpath(idx)
        window(tk_send('windowpath', _to_idx(idx)))
      end

[Validate]