Bug #11886 ยป bug_11886.patch
ext/tk/lib/tk/menubar.rb | ||
---|---|---|
# 'tearoff'=>false,
|
||
# 'foreground'=>'grey40',
|
||
# 'activeforeground'=>'red',
|
||
# 'font'=>'Helvetia 12 bold')
|
||
# 'font'=>'Helvetica 12 bold')
|
||
# menubar.pack('side'=>'top', 'fill'=>'x')
|
||
# See tk/menuspce.rb about the format of the menu_spec
|
ext/tk/sample/menubar1.rb | ||
---|---|---|
'tearoff'=>false,
|
||
'foreground'=>'grey40',
|
||
'activeforeground'=>'red',
|
||
'font'=>'Helvetia 12 bold')
|
||
'font'=>'Helvetica 12 bold')
|
||
menubar.pack('side'=>'top', 'fill'=>'x')
|
||
TkText.new(:wrap=>'word').pack.insert('1.0', 'Please read the sample source, and check how to override default configure options of menu entries on a menu_spec. Maybe, on windows, this menubar does not work properly about keyboard shortcuts. Then, please use "menu" option of root/toplevel widget (see sample/menubar2.rb).')
|
ext/tk/sample/menubar2.rb | ||
---|---|---|
'tearoff'=>'false',
|
||
'foreground'=>'grey40',
|
||
'activeforeground'=>'red',
|
||
'font'=>'Helvetia 12 bold')
|
||
'font'=>'Helvetica 12 bold')
|
||
# This (default configure options) is NOT same the following.
|
||
#
|
||
# mbar = Tk.root.add_menubar(menu_spec)
|
||
# mbar.configure('foreground'=>'grey40', 'activeforeground'=>'red',
|
||
# 'font'=>'Helvetia 12 bold')
|
||
# 'font'=>'Helvetica 12 bold')
|
||
TkText.new(:wrap=>'word').pack.insert('1.0', 'Please read the sample source, and check how to override default configure options of menu entries on a menu_spec.')
|
||
ext/tk/sample/menubar3.rb | ||
---|---|---|
'tearoff'=>false,
|
||
'foreground'=>'grey40',
|
||
'activeforeground'=>'red',
|
||
'font'=>'Helvetia 12 bold')
|
||
'font'=>'Helvetica 12 bold')
|
||
menubar.pack('side'=>'left', 'fill'=>'y')
|
||
TkText.new(:wrap=>'word').pack.insert('1.0', 'This sample script generates "Menu Sidebar".
|