Hidetoshi NAGAI [mailto:nagai / ai.kyutech.ac.jp] wrote:

> On windows version of Tcl/Tk, it seems that  menubutton bindings 
> which expected on TkMenubar class don't work properly. 
> But 'menu' option of root/toplevel widget looks like working. 
> Please try to use the 'menu' option. 
> 
> e.g.
> ---------------------------------------------------------------------
> menubar = TkMenu.new(Tk.root)
> 
> Tk.root[:menu] = menubar  # use 'menu' option
> 
> mfile = TkMenu.new(menubar, :tearoff=>false)
> medit = TkMenu.new(menubar, :tearoff=>false)
> 
> menubar.add(:cascade, :menu=>mfile, :label=>'File', 
> :underline=>0) menubar.add(:cascade, :menu=>medit, 
> :label=>'Edit', :underline=>0)
> 
> mfile.add(:command, :label=>'Open', :underline=>0, 
> :command=>proc{p 'Open'}) mfile.add(:command, :label=>'Quit', 
> :underline=>0, :command=>proc{exit})
> 
> medit.add(:command, :label=>'Copy', :underline=>0, 
> :command=>proc{p 'Copy'}) medit.add(:command, 
> :label=>'Paste', :underline=>0, :command=>proc{p 'Paste'})
> 
> txt = TkText.new.pack
> 
> Tk.mainloop

Ah, that works. But I like the your new option of using menu_spec :-)
Will wait for the fix in windows... Thank you.


>                                   Hidetoshi NAGAI 
> (nagai / ai.kyutech.ac.jp)
> 

kind regards -botp