PennController for IBEX › Forums › Support › Checking if scale item with canvas label is selected › Reply To: Checking if scale item with canvas label is selected
June 9, 2023 at 5:31 am
#10675
![](https://www.pcibex.net/wp-content/uploads/2018/10/IMG_8365-e1540835663655-150x150.jpg)
Keymaster
Hello,
When you set an option’s label using a reference to a PennController element, you can test the selected value by using that element’s name. As a consequence, you’ll want to make sure that when multiple labels refer to PennController elements, the elements have different names (which they do, in your case). So you can do this:
newScale('pltest', "0", "1", "2") .vertical() .radio() .label(0, getCanvas('pl_0_can')) .label(1, getCanvas('pl_1_can')) .label(2, getCanvas('pl_2_can')) .labelsPosition("right") .settings.center() .print() .wait(getScale('pltest').test.selected("pl_0_can"))
Jeremy