Class: GoToLine

Inherits:
TkFloatTitledFrame
  • Object
show all
Defined in:
ext/ae-editor/ae-editor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_parent) ⇒ GoToLine

Returns a new instance of GoToLine.



2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
# File 'ext/ae-editor/ae-editor.rb', line 2463

def initialize(_parent)
  super(_parent)
  #stop_resizing
  y0 = 10
  d = 23    
 TkLabel.new(self.frame){
 	text 'Go to line:'
 	place('x' => 8,'y' => y0,'height' => 19)
 }
 y0 = y0 + d
 	@e_line = TkEntry.new(self.frame){
    justify  'left'
    relief  'ridge'
    place('relwidth' => 1, 'width'=>-16,'x' => 8,'y' => y0,'height' => 19)
 	}
  
 	y0 = y0 + d
 	y0 = y0 + d
 @buttons_frame = TkFrame.new(self.frame).pack('fill'=>'x', 'side'=>'bottom')	
  
  @b_go = TkButton.new(@buttons_frame){|_b_go|
    compound  'none'
    default  'disabled'
    text  'Go'
    overrelief  'raised'
    justify  'center'
    pack('side'=>'right','ipadx'=>5, 'padx'=>5)
  }
  place('x'=>150,'y'=>150,'height'=> 120,'width'=> 100)
  
end

Instance Attribute Details

#b_goObject (readonly)

Returns the value of attribute b_go.



2462
2463
2464
# File 'ext/ae-editor/ae-editor.rb', line 2462

def b_go
  @b_go
end

#e_lineObject (readonly)

Returns the value of attribute e_line.



2461
2462
2463
# File 'ext/ae-editor/ae-editor.rb', line 2461

def e_line
  @e_line
end

Instance Method Details

#showObject



2495
2496
2497
2498
2499
2500
# File 'ext/ae-editor/ae-editor.rb', line 2495

def show
  super
  self.focus
  @e_line.focus
  @e_line.selection_range(0,'end')
end