I need to make appear/disappear a Button's icon.
This would be similar to:
radioButton.strokeColor = color.transparent;
radioButton.strokeColor = color.black;
but the target would be the Button's icon, instead of the current stroke.
I also need a way to inspect the current status of that Button's icon (is it visible?). So, I need a get() and I need a set().
This is in reference to my problem above, i.e. the JS commands needed to make the button's icon appear/disappear.
I found this in the documentation:
cDIPath: "/C/temp/myIcon.pdf", nPage: 0});
var myIcon = this.getIcon("myIconName");
That suggests the possibility that I create two icons: a red circle and an empty icon, and switch them around.
That approach would leave the question of how to inspect which of the two icons is currently associated with the Button.
The answer to this question is:
Using a Button Icon to implement a Circling Tool == NOT a good idea.
Button + Circle Annotation is the way to go.
The only shortcoming (compared with a real Radio Button/Check Box) is that you will not be able to [un]check an item by pressing SPACE.