class HinnerSplittedDialog
Attributes
frame[R]
splitter_frame[R]
Public Class Methods
new(side='top', height=100, args=nil)
click to toggle source
Calls superclass method
HinnerDialog::new
# File lib/a-tkcommons.rb, line 3327 def initialize(side='top', height=100, args=nil) super(side, args) @y0= height fr = TkFrame.new(self){ height height pack('side' =>side,'padx'=>0, 'pady'=>0, 'fill'=>'x', 'expand'=>'1') } splitter_frame = TkFrame.new(self, Arcadia.style('splitter')){ height 5 pack('side' =>side,'padx'=>0, 'pady'=>0, 'fill'=>'x', 'expand'=>'1') } oldcursor = splitter_frame.cget('cursor') tmpcursor = 'sb_v_double_arrow' yx=0 splitter_frame.bind_append("Enter", proc{|x, y| splitter_frame.configure('cursor'=> tmpcursor) } , "%x %y") splitter_frame.bind_append("B1-Motion", proc{|x, y| yx=y splitter_frame.raise } ,"%x %y") splitter_frame.bind_append("ButtonRelease-1", proc{ splitter_frame.configure('cursor'=> oldcursor) if side == 'top' h = (@y0+yx).abs elsif side == 'bottom' h = (@y0-yx).abs end @y0 = h fr.configure('height'=>h) }) @frame = fr @splitter_frame = splitter_frame end
Public Instance Methods
height(_h=nil)
click to toggle source
# File lib/a-tkcommons.rb, line 3365 def height(_h=nil) if _h.nil? @frame.height else @frame.configure('height'=>_h) @y0 = _h end end