Class: TkTitledScrollFrame

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

Overview

class TkTitledMovableFrame < TkTitledFrame

attr_reader :wrapper
def initialize(root_parent=nil, parent=nil, title=nil, img=nil , keys=nil)
  @root_parent = root_parent
  #@wrapper = TkFrameAdapter.new(@root_parent, 'background'=>'red')
  @wrapper = TkFrameAdapter.new(@root_parent, Arcadia.style('frame'))
  super(parent, title, img, keys)
  #@wrapper.add_moved_by(@top)
  @wrapper.attach_frame(@frame)
  @frame=@wrapper
end

def change_wrapper(_new_wrapper)
  @wrapper = _new_wrapper
  @frame = _new_wrapper
end  

#  def initialize(root_parent=nil, parent=nil, title=nil, img=nil , keys=nil)
#    @root_parent = root_parent
#    @wrapper = TkFrameAdapter.new(@root_parent, Arcadia.style('frame'))
#    super(@wrapper, title, img, keys)
#    @wrapped_frame=parent
#    #@wrapper.add_moved_by(@top)
#    @wrapper.attach_frame(parent)
#  end

end

Instance Attribute Summary

Attributes inherited from TkTitledFrame

#frame, #parent, #top

Attributes inherited from TkBaseTitledFrame

#frame, #top

Instance Method Summary collapse

Methods inherited from TkTitledFrame

#add_sep, #head_buttons, #initialize, #maximize, #maximized?, #resize, #title, #top_text

Methods inherited from TkBaseTitledFrame

#add_button, #add_menu_button, #head_buttons, #initialize, #menu_button

Constructor Details

This class inherits a constructor from TkTitledFrame

Instance Method Details

#create_frameObject



1050
1051
1052
# File 'lib/a-tkcommons.rb', line 1050

def create_frame
  return Tk::ScrollFrame.new(self,:scrollbarwidth=>10, :width=>300, :height=>200).place('x'=>0, 'y'=>@title_height,'height'=>-@title_height,'relheight'=>1, 'relwidth'=>1)
end