I have several button bars (created dynamically), each with their own event listeners (also created dynamically).
I want the button pressed to remain selected, but can't achieve this. I'm trying to do this by getting the index of the selected button, then setting the index of the button bar object. When I select a button, it is instantaneously selected, but then de-selects again.
Any ideas on how to get the button to stay selected?
It's not clear what you are trying to do with the button bars I.e where they are being placed.
To 'keep a button selected' simply change its background image to the same as the backgroundSelected state. There's no way to hold on to it, the event is fired and as soon as you stop pressing down the selectedBackground state is removed.. So cheat..
Or you can do it with colours as well..
Think you can help? Login to answer this question!