Class: TkLabelTitledFrame
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_sep, #create_frame, #head_buttons, #initialize, #menu_button, #visible?
Constructor Details
This class inherits a constructor from TkTitledFrame
Instance Method Details
#__create_left_label(_frame) ⇒ Object
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
|
# File 'lib/a-tkcommons.rb', line 1173
def __create_left_label(_frame)
@title.nil??_text_title ='':_text_title = @title+' :: '
_img=@img
TkLabel.new(_frame, Arcadia.style('titlelabel')){
text _text_title
anchor 'w'
compound 'left'
image TkAllPhotoImage.new('file' => _img) if _img
pack('side'=> 'left','anchor'=> 'e')
}
end
|
#create_left_title ⇒ Object
1168
1169
1170
1171
|
# File 'lib/a-tkcommons.rb', line 1168
def create_left_title
@left_label = __create_left_label(@top)
@left_label.bind_append("Double-Button-1", proc{resize})
end
|
#shift_off ⇒ Object
1189
1190
1191
|
# File 'lib/a-tkcommons.rb', line 1189
def shift_off
@left_label.foreground(Arcadia.conf('titlelabel.disabledforeground'))
end
|
#shift_on ⇒ Object
1185
1186
1187
|
# File 'lib/a-tkcommons.rb', line 1185
def shift_on
@left_label.foreground(Arcadia.conf('titlelabel.foreground'))
end
|
#title(_text = nil) ⇒ Object
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
|
# File 'lib/a-tkcommons.rb', line 1193
def title(_text=nil)
if _text.nil?
return @title
else
@title=_text
if _text.strip.length == 0
@left_label.text('')
else
@left_label.text(_text+'::')
end
end
end
|