in reply to Tk menu Apple macOS
Even if the post is quite old, here it is how to modify the Application menu, for example the default "About my application", using Tcl::pTk and Tcl::Tk
my $toplevel = $mw->toplevel; my $menubar = $toplevel->Menu(-type => 'menubar'); my $int = $mw->interp; my $menuPATH = $int->widget($menubar);#getting Tk name of menubar $int->Eval(" $menuPATH add cascade -menu [menu $menuPATH.apple] $menuPATH.apple add command -command {tk_messageBox -message \ +"Copyright XXX\"} -label \"About My Application\" $menuPATH.apple add separator "); #rest of the menu comes here $toplevel->configure(-menu => $menubar);
|
|---|