MathGroup Archive 2011

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

Search the Archive

Re: How Can I Include a Button in a Manipulate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120434] Re: How Can I Include a Button in a Manipulate
  • From: Gregory Lypny <gregory.lypny at videotron.ca>
  • Date: Fri, 22 Jul 2011 19:45:35 -0400 (EDT)
  • References: <5165123.71643.1311294303544.JavaMail.root@m06>

Thank you, David.  I will check it out.  Where can I find the Presentations application?

Gregory



On Thu, Jul 21, 2011, at 8:59 PM, David Park wrote:

> Gregory,
> 
> I'm not certain how easy it is to do with Manipulate, but it is certainly
> possible to do it with a custom dynamic display. I find custom dynamic
> displays much easier to write because you can format them any way you wish
> without having to override defaults.
> 
> The Presentations application, in the PlaneGeometry section, has a tutorial
> that shows how to write custom dynamics, including one example with a button
> that performs an action on the displayed dynamic.
> 
> The trick is to think of primary dynamic variables (operated by controls)
> and secondary dynamic variables that depend on the primary variables. Write
> a routine, or routines, that calculate the secondary variables from the
> primary variables. Invoke these by using the second argument in the Dynamic
> statement. The random number could be an initially set primary variable. The
> button could then regenerate it and recalculate all the secondary variables.
> 
> 
> David Park
> djmpark at comcast.net
> http://home.comcast.net/~djmpark/  
> 
> 
> 
> 
> From: Gregory Lypny [mailto:gregory.lypny at videotron.ca] 
> 
> 
> Hello everyone,
> 
> I have a Manipulate that generates a random integer or integers 
> depending on the user's choice of parameters in a number of setter 
> bars.  I'd like to include a button in the Manipulate's output pane 
> that allows the user to generate a new result by generating a new random 
> number while keeping all of the parameters in the setter bar the same.  
> Can that be done?
> 
> 
> Regards,
> 
> Gregory
> 



  • Prev by Date: Re: FinancialData still broken
  • Next by Date: call Fortran subroutine from Mathematica // use NETLink and DLL
  • Previous by thread: Re: How Can I Include a Button in a Manipulate
  • Next by thread: Producing an image that only contains its interior and boundary but, no exterior.