# Extract value from SetterBar

I have a question about the SetterBar function. Is there any way to extract the selected value to use it further?

myValue = SetterBar[2, Range[5]]
myValue * 2

• does 2 Setting[myValue] give what you need? – kglr Mar 7 at 17:48

### Setting

You can use Setting:

myValue = SetterBar[2, Range[5]]


2 Setting[myValue]

4


### Dynamic

Alternatively, you can to use Dynamic:

### Generalized input

Finally, you can use Setting and Evaluate In Place the setter bar to make the setter bar an input expression:

Highlight SetterBar[2, Range[5]] in

Setting[2 SetterBar[2, Range[5]]]


and hit CTRLSHIFTEnter to get

Select a value in the setter bar and hit SHIFTEnter to get