class Tk::Label

A label is a widget that displays a textual string, bitmap or image.

If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines or if wrapping occurs because of the wrapLength option) and one of the characters may optionally be underlined using the underline option.

The label can be manipulated in a few simple ways, such as changing its relief or text. Additional options may be specified to configure aspects of the label such as its colors, font, text, and initial relief.

Public Class Methods

tk_command() click to toggle source
# File lib/ffi-tk/widget/label.rb, line 17
def self.tk_command
  'label'
end

Public Instance Methods

value() click to toggle source
# File lib/ffi-tk/widget/label.rb, line 25
def value
  cget(:text)
end
value=(string) click to toggle source
# File lib/ffi-tk/widget/label.rb, line 21
def value=(string)
  configure(text: string)
end