I wish I didn't feel like a newbie after several months, but...
If I enter the following:
Table[ Button[ "Number: " <> ToString @ i, Print @ i], {i, 1, 5}]
this creates a list of buttons, labelled Number: 1
, Number: 2
, etc. but pressing each button only prints i
, not the number corresponding to the button. I assume this is standard newbie-doesn't-understand Mathematica
stuff, but would appreciate any explanation of how to change the behaviour so that each button prints the value of i
.
Button
'sHoldRest
attribute required I useWith
to get the kind of behavior you are looking for. $\endgroup$