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_progress, #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
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
|
# File 'lib/a-tkcommons.rb', line 1301
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
1296
1297
1298
1299
|
# File 'lib/a-tkcommons.rb', line 1296
def create_left_title
@left_label = __create_left_label(@top)
@left_label.bind_append("Double-Button-1", proc{resize})
end
|
#shift_off ⇒ Object
1318
1319
1320
1321
|
# File 'lib/a-tkcommons.rb', line 1318
def shift_off
@left_label.state='disable'
end
|
#shift_on ⇒ Object
1313
1314
1315
1316
|
# File 'lib/a-tkcommons.rb', line 1313
def shift_on
@left_label.state='normal'
end
|
#title(_text = nil) ⇒ Object
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
|
# File 'lib/a-tkcommons.rb', line 1323
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
|