views:

39

answers:

1

Hi,

I have a button to which I have applied stylesheet(below) which works great.

.toolButton { up-skin :Embed(source='resources/angle.png'); over-skin :Embed(source='resources/angleH.png'); down-skin :Embed(source='resources/angle.png'); }

Now, I have a new requirement where I need to keep the button in pressed(down) state until the user clicks on this button again. What is the best way I can achieve this.

thank you

+1  A: 

Use ToggleButton. There is an example at Flex Examples.

For Flex 3 I suppose a ToggleButtonBar with a single button in it would do.

Vladimir Grigorov
Hello Vladimir, I am still using Flex 3, is there a solution for Flex 3 also.thank you
firemonkey
@firemonkey - I think you could utilize the ToggleButtonBar with one button.
Vladimir Grigorov
In flex 3 you can just use mx.controls.Button and set its 'toggle' property to true. You can then style with 'selected-up-skin', 'selected-over-skin', and so on.
Dave