Class: KeyTest

Inherits:
TkFloatTitledFrame show all
Defined in:
lib/a-tkcommons.rb

Constant Summary

Constants included from TkResizable

TkResizable::MIN_HEIGHT, TkResizable::MIN_WIDTH

Instance Attribute Summary collapse

Attributes inherited from TkBaseTitledFrame

#frame, #top

Instance Method Summary collapse

Methods inherited from TkFloatTitledFrame

#head_buttons, #hide, #on_close=, #show, #show_grabbed, #title

Methods included from TkResizable

#resizing_do_move_obj, #resizing_do_press, #start_resizing, #stop_resizing

Methods included from TkMovable

#moving_do_move_obj, #moving_do_press, #start_moving, #stop_moving

Methods inherited from TkBaseTitledFrame

#add_fixed_button, #add_fixed_menu_button, #add_fixed_sep, #create_frame, #head_buttons, #menu_button, #visible?

Constructor Details

#initialize(_parent = nil) ⇒ KeyTest

Returns a new instance of KeyTest.



1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
# File 'lib/a-tkcommons.rb', line 1794

def initialize(_parent=nil)
  _parent = Arcadia.instance.layout.root if _parent.nil?
  super(_parent)

  @ttest = TkText.new(self.frame){
    background  '#FFF454'
    #place('relwidth' => '1','relx' => 0,'x' => '0','y' => '0','relheight' => '1','rely' => 0,'height' => '0','bordermode' => 'inside','width' => '0')
  }.bind("KeyPress"){|e|
    @ttest.insert('end'," "+e.keysym+" ")
    break
  }
  @ttest.extend(TkScrollableWidget).show
  place('x'=>100,'y'=>100,'height'=> 220,'width'=> 500)
end

Instance Attribute Details

#ttestObject (readonly)

Returns the value of attribute ttest.



1793
1794
1795
# File 'lib/a-tkcommons.rb', line 1793

def ttest
  @ttest
end