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
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
|
# File 'lib/a-tkcommons.rb', line 1358
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
1349
1350
1351
1352
|
# File 'lib/a-tkcommons.rb', line 1349
def create_left_title
@left_menu_button = (@top)
@left_menu_button.bind_append("Double-Button-1", proc{resize})
end
|
#shift_off ⇒ Object
1382
1383
1384
1385
|
# File 'lib/a-tkcommons.rb', line 1382
def shift_off
@left_menu_button.state='disable'
end
|
#shift_on ⇒ Object
1377
1378
1379
1380
|
# File 'lib/a-tkcommons.rb', line 1377
def shift_on
@left_menu_button.state='normal'
end
|
#title(_text = nil) ⇒ Object
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
|
# File 'lib/a-tkcommons.rb', line 1387
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
|
1354
1355
1356
|
# File 'lib/a-tkcommons.rb', line 1354
def
@left_menu_button.cget('menu') if @left_menu_button
end
|