Sha256: d5fa848f946e0f68d40ed862f17f23bde63a35957a87f4c15ad435ff4c7680a0
Contents?: true
Size: 860 Bytes
Versions: 1
Compression:
Stored size: 860 Bytes
Contents
require_relative 'browser_column_component' module TkComponent class RBrowserComponent < TkComponent::Base attr_accessor :data_source attr_accessor :selected_path attr_accessor :paned attr_accessor :max_columns def initialize(options = {}) super @data_source = options[:data_source] @selected_path = options[:selected_path] || [] @paned = !!options[:paned] @max_columns = options[:max_columns] end def render(p, parent_component) p.insert_component(TkComponent::BrowserColumnComponent, self, browser: self, column_index: 0, sticky: 'nsew', x_flex: 1, y_flex: 1) do |bc| bc.on_event 'ItemSelected', ->(e) do puts "ItemSelected" emit('PathChanged') end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tk_component-0.2.0 | lib/tk_component/components/r_browser_component.rb |