Class: TkComponent::Window
Instance Attribute Summary
Attributes inherited from Base
#children, #node, #parent, #parent_node, #tk_item
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Window
constructor
A new instance of Window.
- #name ⇒ Object
- #place_root_component(component, options = {}) ⇒ Object
Methods inherited from Base
#add_child, #build, #component_did_build, #emit, #generate, #parse_component, #parse_nodes, #rebuild, #regenerate, #regenerate_after_node, #regenerate_from_index, #regenerate_from_node, #render
Methods included from BasicComponent
Constructor Details
Instance Method Details
#name ⇒ Object
8 9 10 |
# File 'lib/tk_component/base/window.rb', line 8 def name "Window" end |
#place_root_component(component, options = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/tk_component/base/window.rb', line 12 def place_root_component(component, = {}) component.parent = self component.generate(self) component.build(self) x_flex = [:x_flex] || 1 y_flex = [: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 |