+1
Є відповідь

State Attribute

jralston 12 років тому оновлено icahill (Administrator) 12 років тому 1
I have a question about the state attribute.

Let's say I have several sibling objects and they all use the same class. A style is defined in the class (for example, text color). Can you define different text color for the object that has state=on? Or do you have define text color in the object and then change it in the action that changes the state?
If you want to use a state, then you would have to accomplish this using the latter.

However you could probably achieve this scenario using wire variables. If you set a variable on the class for text color, your action can define an if statement that will assign the variable depending on the currently displaying object.