Class: TkComponent::Builder::TkWindow
- Defined in:
- lib/tk_component/builder/tk_item.rb
Instance Attribute Summary
Attributes inherited from TkItem
Instance Method Summary collapse
- #focus ⇒ Object
-
#initialize(parent_item, name, options = {}, grid = {}, event_handlers = []) ⇒ TkWindow
constructor
A new instance of TkWindow.
Methods inherited from TkItem
#apply_internal_grid, #apply_option, #apply_options, #built, create, #create_native_item, #native_item_class, #remove, #set_event_handler, #set_event_handlers, #set_grid
Constructor Details
#initialize(parent_item, name, options = {}, grid = {}, event_handlers = []) ⇒ TkWindow
Returns a new instance of TkWindow.
475 476 477 478 479 480 481 482 |
# File 'lib/tk_component/builder/tk_item.rb', line 475 def initialize(parent_item, name, = {}, grid = {}, event_handlers = []) if (.delete(:root)) @native_item = TkRoot.new { title [:title] } else @native_item = TkToplevel.new { title [:title] } end () end |
Instance Method Details
#focus ⇒ Object
484 485 486 |
# File 'lib/tk_component/builder/tk_item.rb', line 484 def focus self.native_item.set_focus end |