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_button, #add_menu_button, #create_frame, #head_buttons, #menu_button

Constructor Details

#initialize(_parent = nil) ⇒ KeyTest

Returns a new instance of KeyTest.



1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
# File 'lib/a-tkcommons.rb', line 1369

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

  #Tk.tk_call('wm', 'title', self, '...hello' )
  #Tk.tk_call('wm', 'geometry', self, '638x117+200+257' )

  @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
  }
  _wrapper = TkScrollWidget.new(@ttest)
  _wrapper.show
  _wrapper.show_v_scroll
  _wrapper.show_h_scroll
  place('x'=>100,'y'=>100,'height'=> 220,'width'=> 500)
end

Instance Attribute Details

#ttestObject (readonly)

Returns the value of attribute ttest.



1368
1369
1370
# File 'lib/a-tkcommons.rb', line 1368

def ttest
  @ttest
end