Forum Discussion
Button states not working correctly now
Hi,
I have created a button that has two states, normal and selected.
It is designed to act like a toggle switch. In the States it looks fine but when I preview it, it shows both states together when I click on it.
It worked previously but it does not work now. Any ideas?
7 Replies
- WaltHamiltonSuper Hero
- DarrenNashCommunity Member
Thanks for the example.
It seems to be a lot of extra work to do it as it seems you have to build the second state from scratch.
What I did was to simply copy the first state and then just moved the white circle to the right for the second state. It looked correct, but it is a bit odd that it previews incorrect....
thanks again.
- WaltHamiltonSuper Hero
I know, it seems like it should work that way, but it has something to do with the built-in states being (to some extent) overlays of the normal (base) state.
- CarlBeyboerCommunity Member
I've just come across this and cant remember seeing it before in previous project and yet I'm sure I've built buttons the same way for the last 3 years.:
Circle shape, blue
Select circle and go to state tab>edit state
Add a ? to the centre
Duplicate the state to a "visited" state
Edit the shape to make it green, remove the ? and replace it with a tick.
finish editing statesmouse over the 2 states in the "States" tab and they display correctly on screen. But when you preview the slide and click on the Blue circle, it correctly changes to green but the "tick" is superimposed over the ?
My work around it to add another green circle shape over the original in the visited state like a mask and adding the tick over the top again?
Is this expected behaviour?
- MariaCSStaff
Hi, Carl.
As Walt pointed out above, this is the expected behavior. The other built-in states add to the properties of the Normal state, which is why, in your example, you also see the question mark in the visited state.
Another workaround would be to cut (Ctrl+X) the shape from the visited state and paste it (Ctrl+V) back:

I hope this helps!
- CarlBeyboerCommunity Member
Yes, this helps. I thought I was going crazy and my work around is exactly as described above. It might be useful if the "pre-preview" preview of the states as you mouse over them in the application window could show you that the alternate state object is transparent over the "normal" state so you address it before hitting the preview button :)
Hello Carl!
I'm so glad that Maria's suggestions were helpful! Good call on showing the transparent alternate state object over the Normal state in the slide view. I'll pass that over to my team!