Class: Tk::Iwidgets::Tabnotebook

Class | Tk::Iwidgets::Tabnotebook
In: | tk/lib/tkextlib/iwidgets/tabnotebook.rb
Parent: | Tk::Itk::Widget

### Methods

add child_site child_site_list delete index insert new next prev scrollbar scrollcommand select tagid view view_moveto view_scroll xscrollbar xscrollcommand xview xview_moveto xview_scroll yscrollbar yscrollcommand yview yview_moveto yview_scroll

### Included Modules

TkItemConfigMethod

### Constants

TkCommandNames | = | ['::iwidgets::tabnotebook'.freeze].freeze
WidgetClassName | = | 'Tabnotebook'.freeze

### External Aliases

itemcget | -> | pagecget
itemconfigure | -> | pageconfigure
itemconfiginfo | -> | pageconfiginfo
current_itemconfiginfo | -> | current_pageconfiginfo

### Public Class methods

new(*args)

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 69
      def initialize(*args)
        super(*args)
        @tabset = self.component_widget('tabset')
      end

### Public Instance methods

add(keys={})

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 74
      def add(keys={})
        window(tk_call(@path, 'add', *hash_kv(keys)))
      end

child_site(idx)

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 82
      def child_site(idx)
        window(tk_call(@path, 'childsite', index(idx)))
      end

child_site_list()

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 78
      def child_site_list
        list(tk_call(@path, 'childsite'))
      end

delete(idx1, idx2=nil)

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 86
      def delete(idx1, idx2=nil)
        if idx2
          tk_call(@path, 'delete', index(idx1), index(idx2))
        else
          tk_call(@path, 'delete', index(idx1))
        end
        self
      end

index(idx)

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 95
      def index(idx)
        #number(tk_call(@path, 'index', tagid(idx)))
        @tabset.index(tagid(idx))
      end

insert(idx, keys={})

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 100
      def insert(idx, keys={})
        window(tk_call(@path, 'insert', index(idx), *hash_kv(keys)))
      end

next()

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 104
      def next
        tk_call(@path, 'next')
        self
      end

prev()

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 109
      def prev
        tk_call(@path, 'prev')
        self
      end

scrollbar(bar=nil)

Alias for yscrollbar

scrollcommand(cmd=Proc.new)

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 119
      def scrollcommand(cmd=Proc.new)
        configure_cmd 'scrollcommand', cmd
        self
      end

select(idx)

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 114
      def select(idx)
        tk_call(@path, 'select', index(idx))
        self
      end

tagid(tagOrId)

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 40
      def tagid(tagOrId)
        if tagOrId.kind_of?(Tk::Itk::Component)
          tagOrId.name
        else
          #_get_eval_string(tagOrId)
          tagOrId
        end
      end

view(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 148
      def view(*index)
        if index.size == 0
          window(tk_send_without_enc('view'))
        else
          tk_send_without_enc('view', *index)
          self
        end
      end

view_moveto(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 159
      def view_moveto(*index)
        view('moveto', *index)
      end

view_scroll(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 164
      def view_scroll(*index)
        view('scroll', *index)
      end

xscrollbar(bar=nil)

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 126
      def xscrollbar(bar=nil)
        if bar
          @scrollbar = bar
          @scrollbar.orient 'horizontal'
          self.scrollcommand {|*arg| @scrollbar.set(*arg)}
          @scrollbar.command {|*arg| self.xview(*arg)}
          Tk.update  # avoid scrollbar trouble
        end
        @scrollbar
      end

xscrollcommand(cmd=Proc.new)

Alias for scrollcommand

xview(*index)

Alias for view

xview_moveto(*index)

Alias for view_moveto

xview_scroll(*index)

Alias for view_scroll

yscrollbar(bar=nil)

[Source]

    # File tk/lib/tkextlib/iwidgets/tabnotebook.rb, line 136
      def yscrollbar(bar=nil)
        if bar
          @scrollbar = bar
          @scrollbar.orient 'vertical'
          self.scrollcommand {|*arg| @scrollbar.set(*arg)}
          @scrollbar.command {|*arg| self.yview(*arg)}
          Tk.update  # avoid scrollbar trouble
        end
        @scrollbar
      end

yscrollcommand(cmd=Proc.new)

Alias for scrollcommand

yview(*index)

Alias for view

yview_moveto(*index)

Alias for view_moveto

yview_scroll(*index)

Alias for view_scroll

[Validate]