MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to change Mathematicas menus on the fly?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26686] Re: [mg26622] How to change Mathematicas menus on the fly?
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Wed, 17 Jan 2001 00:47:34 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

At 09:36 PM 1/13/2001, Mikael Adlers wrote:
>Dear Friends:
>I am using Mathematica 4.0 on a Windows2000 computer.
>
>Now, my problem is that I would like to change the Mathematica
>menus when a package is loaded. I have seen this question before
>but never a full answer to the question.
>
>I have managed to load the MenuSetup.tr file, change it, and call
>
>  FrontEndExecute[ResetMenusPacket[menuStr]];
>
>to change the menubar.
>
>However, I still have some problems
>
>1) The window menu looses all the names of the currently open windows
>    (not strange since theses are not defined in MenuSetup.tr).
>    Is there a way to read the current menubar from Mathematica?
>
>2) The context menu (right click menu) disappear. It's possible to
>    change the context menu by changing the file PopupMenuSetup.tr, but
>    can this be done from Mathematica?
>
>If anyone has solved these problems I would be grateful.
>
>Thanks in advance
>/Mikael Adlers
>
>------------------------------------------------------------------
>  Mikael Adlers, Ph.D.          email: mikael at mathcore.com
>  MathCore AB                   phone: +4613 32 85 07
>  Teknikringen 1F               fax:         21 27 01
>  SE-583 30 Linkoping, Sweden


Your first problem is a bug and there isn't a good way to work around 
it.  Your second problem can by using the following syntax for 
ResetMenusPacket...

ResetMenusPacket[{main, context}]

where 'main' is the main Menu[] expression, and 'context' is the 
right-click Menu[] expression (which you can find in PopupMenuSetup.tr in 
the TextResources\Windows directory).



Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.



  • Prev by Date: Re: Partial Differential Equation
  • Next by Date: Re: Mathematica 3.0, 4.0, 4.1 differences in DSolve[]
  • Previous by thread: How to change Mathematicas menus on the fly?
  • Next by thread: Partial Differential Equation