Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #3928

Re: How Can I Include a Button in a Manipulate

From Heike Gramberg <heike.gramberg@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How Can I Include a Button in a Manipulate
Date 2011-07-22 23:54 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j0d2jo$s2m$1@smc.vnet.net> (permalink)
References <201107220107.VAA16785@smc.vnet.net>

Show all headers | View raw


You could do something like

Manipulate[Module[{p},
  q; p = RandomInteger[max, {height, width}];
  p // TableForm],
 {{width, 3}, Range[8], SetterBar},
 {{height, 3}, Range[8], SetterBar},
 {{max, 4}, Range[10], SetterBar},
 {{q, False}, ControlType -> None},
 Control[Button["Regenerate", q = Not[q]]]
 ]

Heike

On 22 Jul 2011, at 02:07, Gregory Lypny wrote:

> 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
> 

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: How Can I Include a Button in a Manipulate Heike Gramberg <heike.gramberg@gmail.com> - 2011-07-22 23:54 +0000

csiph-web