Class TkEntry
In: tk/lib/tk/entry.rb
Parent: TkLabel

Methods

Included Modules

X_Scrollable TkValidation

Constants

TkCommandNames = ['entry'.freeze].freeze
WidgetClassName = 'Entry'.freeze

Public Instance methods

[Source]

# File tk/lib/tk/entry.rb, line 100
  def [](*args)
    self.value[*args]
  end

[Source]

# File tk/lib/tk/entry.rb, line 103
  def []=(*args)
    val = args.pop
    str = self.value
    str[*args] = val
    self.value = str
    val
  end

def create_self(keys)

  super(__conv_vcmd_on_hash_kv(keys))

end private :create_self

[Source]

# File tk/lib/tk/entry.rb, line 24
  def bbox(index)
    list(tk_send_without_enc('bbox', index))
  end

[Source]

# File tk/lib/tk/entry.rb, line 27
  def cursor
    number(tk_send_without_enc('index', 'insert'))
  end

[Source]

# File tk/lib/tk/entry.rb, line 30
  def cursor=(index)
    tk_send_without_enc('icursor', index)
    #self

    index
  end

[Source]

# File tk/lib/tk/entry.rb, line 42
  def delete(first, last=None)
    tk_send_without_enc('delete', first, last)
    self
  end

[Source]

# File tk/lib/tk/entry.rb, line 50
  def dragto(pos)
    tk_send_without_enc('scan', 'dragto', pos)
    self
  end
get()

Alias for value

[Source]

# File tk/lib/tk/entry.rb, line 35
  def index(index)
    number(tk_send_without_enc('index', index))
  end

[Source]

# File tk/lib/tk/entry.rb, line 38
  def insert(pos,text)
    tk_send_without_enc('insert', pos, _get_eval_enc_str(text))
    self
  end

[Source]

# File tk/lib/tk/entry.rb, line 78
  def invoke_validate
    bool(tk_send_without_enc('validate'))
  end

[Source]

# File tk/lib/tk/entry.rb, line 46
  def mark(pos)
    tk_send_without_enc('scan', 'mark', pos)
    self
  end

[Source]

# File tk/lib/tk/entry.rb, line 54
  def selection_adjust(index)
    tk_send_without_enc('selection', 'adjust', index)
    self
  end

[Source]

# File tk/lib/tk/entry.rb, line 58
  def selection_clear
    tk_send_without_enc('selection', 'clear')
    self
  end

[Source]

# File tk/lib/tk/entry.rb, line 62
  def selection_from(index)
    tk_send_without_enc('selection', 'from', index)
    self
  end

[Source]

# File tk/lib/tk/entry.rb, line 66
  def selection_present()
    bool(tk_send_without_enc('selection', 'present'))
  end

[Source]

# File tk/lib/tk/entry.rb, line 69
  def selection_range(s, e)
    tk_send_without_enc('selection', 'range', s, e)
    self
  end

[Source]

# File tk/lib/tk/entry.rb, line 73
  def selection_to(index)
    tk_send_without_enc('selection', 'to', index)
    self
  end
set(val)

Alias for value=

[Source]

# File tk/lib/tk/entry.rb, line 81
  def validate(mode = nil)
    if mode
      configure 'validate', mode
    else
      invoke_validate
    end
  end

[Source]

# File tk/lib/tk/entry.rb, line 89
  def value
    _fromUTF8(tk_send_without_enc('get'))
  end

[Source]

# File tk/lib/tk/entry.rb, line 92
  def value= (val)
    tk_send_without_enc('delete', 0, 'end')
    tk_send_without_enc('insert', 0, _get_eval_enc_str(val))
    val
  end

[Validate]