Class: TkMenuTitledFrame
Instance Attribute Summary
#frame, #parent, #top
#frame, #top
Instance Method Summary
collapse
#__create_right_label, #create_right_label, #head_buttons, #initialize, #last_caption, #last_caption_image, #maximize, #maximized?, #resize, #restore_caption, #save_caption, #top_text, #top_text_bind_append, #top_text_bind_remove, #top_text_clear, #top_text_hide, #top_text_hint
#add_fixed_button, #add_fixed_menu_button, #add_fixed_panel, #add_fixed_progress, #add_fixed_sep, #create_frame, #head_buttons, #initialize, #menu_button, #visible?
Constructor Details
This class inherits a constructor from TkTitledFrame
Instance Method Details
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
|
# File 'lib/a-tkcommons.rb', line 1634
def (_frame)
img=@img
@left_menu_button = Arcadia.wf.(_frame){|mb|
Arcadia.wf.(mb)
if img
image Arcadia.image_res(img)
else
end
textvariable TkVariable.new('')
pack('side'=> 'left','anchor'=> 'e')
}
end
|
#create_left_title ⇒ Object
1625
1626
1627
1628
|
# File 'lib/a-tkcommons.rb', line 1625
def create_left_title
@left_menu_button = (@top)
@left_menu_button.bind_append("Double-Button-1", proc{resize})
end
|
#shift_off ⇒ Object
1658
1659
1660
1661
|
# File 'lib/a-tkcommons.rb', line 1658
def shift_off
@left_menu_button.state='disable'
end
|
#shift_on ⇒ Object
1653
1654
1655
1656
|
# File 'lib/a-tkcommons.rb', line 1653
def shift_on
@left_menu_button.state='normal'
end
|
#title(_text = nil) ⇒ Object
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
|
# File 'lib/a-tkcommons.rb', line 1663
def title(_text=nil)
if _text.nil?
return @title
else
@title=_text
if _text.strip.length == 0
@left_menu_button.textvariable.value=''
else
@left_menu_button.textvariable.value=_text+'::'
end
end
end
|
1630
1631
1632
|
# File 'lib/a-tkcommons.rb', line 1630
def
@left_menu_button.cget('menu') if @left_menu_button
end
|