I would like to have a command "RedoButton" which would make a button (or whatever control is suitable) that when clicked would print the value of a certain function over and over in the same place. So for example RedoButton["do it", RandomInteger[{1, 10}] would produce a button that, when clicked, would produce a random integer of the sort required, clicking it again would produce a possibly different random integer where the old one was, and so on. I have tried Toggle, Button, and numerous other commands but can't make any of them work correctly.
Tell me more
×
Mathematica Stack Exchange is a question and answer site for
users of Mathematica. It's 100% free, no registration required.
|
|
||||
|
|
|
Maybe you could do something like this
|
|||
|
|
|
If you want to use the button itself to show the current value, this may help:
You can then use |
|||
|
|
