class TkComponent::Window
Public Class Methods
new(options = {})
click to toggle source
Calls superclass method
TkComponent::Base::new
# File lib/tk_component/base/window.rb, line 3 def initialize(options = {}) super @tk_item = Builder::TkItem.create(nil, :root, options) end
Public Instance Methods
name()
click to toggle source
# File lib/tk_component/base/window.rb, line 8 def name "Window" end
place_root_component(component, options = {})
click to toggle source
# File lib/tk_component/base/window.rb, line 12 def place_root_component(component, options = {}) component.parent = self component.generate(self) component.build(self) x_flex = options[:x_flex] || 1 y_flex = options[:y_flex] || 1 TkGrid.columnconfigure tk_item.native_item, 0, weight: x_flex TkGrid.rowconfigure tk_item.native_item, 0, weight: y_flex add_child(component) end