Class | Tk::Iwidgets::Promptdialog
In: | tk/lib/tkextlib/iwidgets/promptdialog.rb
Parent: | Tk::Iwidgets::Dialog

### Methods

clear cursor= default delete dragto get hide icursor index insert invoke mark selection_adjust selection_clear selection_from selection_present selection_range selection_to set show value value= xview xview_moveto xview_scroll

### Constants

TkCommandNames | = | ['::iwidgets::promptdialog'.freeze].freeze
WidgetClassName | = | 'Promptdialog'.freeze

### Public Instance methods

clear()

based on Tk::Iwidgets::Entryfield

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 48
      def clear
        tk_call(@path, 'clear')
        self
      end

cursor=(index)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 69
      def cursor=(index)
        tk_send_without_enc('icursor', index)
        #self
        index
      end

default(name)

index method is not available, because it shows index of the entry field

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 22
      def default(name)
        tk_call(@path, 'default', tagid(name))
        self
      end

delete(first, last=None)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 53
      def delete(first, last=None)
        tk_send_without_enc('delete', first, last)
        self
      end

dragto(pos)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 89
      def dragto(pos)
        tk_send_without_enc('scan', 'dragto', pos)
        self
      end

get()

Alias for value

hide(name)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 27
      def hide(name)
        tk_call(@path, 'hide', tagid(name))
        self
      end

icursor(index)

Alias for cursor=

index(idx)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 76
      def index(idx)
        number(tk_send_without_enc('index', idx))
      end

insert(pos,text)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 80
      def insert(pos,text)
        tk_send_without_enc('insert', pos, _get_eval_enc_str(text))
        self
      end

invoke(name=nil)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 32
      def invoke(name=nil)
        if name
          tk_call(@path, 'invoke', tagid(name))
        else
          tk_call(@path, 'invoke')
        end
        self
      end

mark(pos)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 85
      def mark(pos)
        tk_send_without_enc('scan', 'mark', pos)
        self
      end

selection_adjust(index)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 93
      def selection_adjust(index)
        tk_send_without_enc('selection', 'adjust', index)
        self
      end

selection_clear()

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 97
      def selection_clear
        tk_send_without_enc('selection', 'clear')
        self
      end

selection_from(index)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 101
      def selection_from(index)
        tk_send_without_enc('selection', 'from', index)
        self
      end

selection_present()

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 105
      def selection_present()
        bool(tk_send_without_enc('selection', 'present'))
      end

selection_range(s, e)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 108
      def selection_range(s, e)
        tk_send_without_enc('selection', 'range', s, e)
        self
      end

selection_to(index)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 112
      def selection_to(index)
        tk_send_without_enc('selection', 'to', index)
        self
      end

set(val)

Alias for value=

show(name)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 41
      def show(name)
        tk_call(@path, 'show', tagid(name))
        self
      end

value()

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 58
      def value
        _fromUTF8(tk_send_without_enc('get'))
      end

value=(val)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 61
      def value= (val)
        tk_send_without_enc('delete', 0, 'end')
        tk_send_without_enc('insert', 0, _get_eval_enc_str(val))
        val
      end

xview(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 117
      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)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 125
      def xview_moveto(*index)
        xview('moveto', *index)
      end

xview_scroll(*index)

[Source]

    # File tk/lib/tkextlib/iwidgets/promptdialog.rb, line 128
      def xview_scroll(*index)
        xview('scroll', *index)
      end

[Validate]