Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: about the use of button

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115051] Re: about the use of button
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Wed, 29 Dec 2010 05:59:26 -0500 (EST)

Evaluating Dynamic does not perform its action.  Only displaying the output of
Dynamic does that, but Button never displays its action.

Note that the documentation for Button has numerous examples which demonstrate
many of its usages.  Several of the examples point to the right way to do this
by using CompoundExpression...i.e., a semicolon-delimited expression.

Button[label, action1;action2]

Sincerely,

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


On Tue, 28 Dec 2010 06:51:17 -0500 (EST), yang wrote:
> Hello, I'm a novice in Mathematica, now got a little puzzeled:
>
> I'm intend to create a button which take two actions while clicked:
>
> Button["A person enters",
> {Dynamic[car_weight+==60],Dynamic[person_number++}]]
>
> seems that this sentence won't work properly,
>
> There must be some error with the grammar, right?



  • Prev by Date: Possible bug in V8: Grid with TextCell
  • Next by Date: Re: Compiling in Mathematica 8
  • Previous by thread: Re: about the use of button
  • Next by thread: VectorFieldPlot problem.