Hello,

When trying to set a font in the TkMenu items of a TkOptionMenubutton,
I encountered a bug, patch attached.

By the way, if someone can tell me how to override TkOptionMenubutton
or TkMenu such that all constructed widgets automatically get the font
I wish it to have, I'm dying to know.

This works for TkText, but I can't get it to work for TkOptionMenubutton

  class TkText
    def initialize(parent, *args)
      args[0].store('font', Font)
      super(parent, *args)
    end
  end

Bye,
Kero.

+--- Kero ------------------------------ kero / chello.nl ---+
|  Don't split your mentality without thinking twice       |
|                          Proud like a God -- Guano Apes  |
+--- M38c ------- http://members.chello.nl/~k.vangelder ---+
Index: ext/tk/lib/tk.rb
===================================================================
RCS file: /src/ruby/ext/tk/lib/tk.rb,v
retrieving revision 1.27
diff -u -r1.27 tk.rb
--- ext/tk/lib/tk.rb	2001/11/19 05:02:17	1.27
+++ ext/tk/lib/tk.rb	2001/12/24 10:19:30
@@ -3008,7 +3008,7 @@
   alias tagfontobj tagfont_configinfo
 
   def tagfont_configure(index, slot)
-    pathname = self.path + ';' + index
+    pathname = self.path + ';' + index.to_s
     if (fnt = slot.delete('font'))
       if fnt.kind_of? TkFont
 	return fnt.call_font_configure(pathname, 
@@ -3175,7 +3175,7 @@
     else
       if (key == 'font' || key == 'kanjifont' ||
 	  key == 'latinfont' || key == 'asciifont' )
-	tagfont_configure({key=>val})
+	tagfont_configure(index, {key=>val})
       else
 	tk_call 'entryconfigure', index, "-#{key}", val
       end