class TkComponent::Builder::TkWindow

Public Class Methods

new(parent_item, name, options = {}, grid = {}, event_handlers = []) click to toggle source
# File lib/tk_component/builder/tk_item.rb, line 475
def initialize(parent_item, name, options = {}, grid = {}, event_handlers = [])
  if (options.delete(:root))
    @native_item = TkRoot.new { title options[:title] }
  else
    @native_item = TkToplevel.new { title options[:title] }
  end
  apply_options(options)
end

Public Instance Methods

focus() click to toggle source
# File lib/tk_component/builder/tk_item.rb, line 484
def focus
  self.native_item.set_focus
end