Class: TKXXS_CLASSES::TextW
- Includes:
- Tk::Tile
- Defined in:
- lib/tkxxs/tkxxs_classes.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(parent, hash = {}) ⇒ TextW
constructor
A new instance of TextW.
Constructor Details
#initialize(parent, hash = {}) ⇒ TextW
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/tkxxs/tkxxs_classes.rb', line 139 def initialize( parent, hash={} ) #---- Frame @frame = Frame.new(parent) {padding "3 3 3 3"}. pack(:fill=>:both, :expand=>true) hash = Marshal.load(Marshal.dump( hash ) ) # Should work because never uses Proc hash = { :font=>'"Courier New" 10', :wrap=>'word', :bd=>'2' }.merge(hash) #---- self = TkText super(@frame, hash) #---- Scrollbars sy = Scrollbar.new(@frame) sy.pack('side'=>'right', 'fill'=>'y') self.(sy) sx = Scrollbar.new(@frame) sx.pack('side'=>'bottom', 'fill'=>'x') self.(sx) self.pack('expand'=>'yes', 'fill'=>'both') end |