I’m trying to create two toggle-button; Button_1 and Button_2.
Expected behaviour
When clicking on Button_1 it should change the stae of Button_1 to “Selected” and the state of Button_2 should be “Normal”.
Clicking on Button_2 should do the opposite.
The problem is that when I click on Button_1 the state is not changed to “Selected”.
I can change the state of another button to “Selected” but not the one I’m clicking on.
Is this intended?
3 answers
It is because the button will change its state when you move the mouse over and out.
To simulate the toggle buttons, you will have to avoid the state changes caused by the mouse events. The easiest way is to use a transparent element to cover the button, and set the buttons’ state in the “Element Clicked” event handler of the transparent element.
-
Your solution is a bit simpler than mine... :D
Thanks.
This question is now closed