Skip to main content
Participating Frequently
March 4, 2012
Question

Mobile toggle button possible?

  • March 4, 2012
  • 3 replies
  • 965 views

Dear all,

I need a very simple toggle enabled button and don't want to skin the not-mobile-optimized ToggleButton. Since I want to place it on ActionBar, the flat-style button seems good for me.

My purpose is simple: when user clicks the button, I want it stay down before user clicks again. I tried to make it by setting currentState but failed.

Would anyone give a simple way here? That is to control button state, the best.

Regards,

Felix

This topic has been closed for replies.

3 replies

Participating Frequently
March 5, 2012
yancaoshiAuthor
Participating Frequently
March 5, 2012

Sorry, but it's not I am looking for.

Let me explain from the beginning. I need a CalloutButton with contentBackgroundAppearance="none" which is inset style by default. Then I use Button to pop up a Callout. However, ordinary cannot keep down state.

Therefore, I need a simple way, no skin.

Hope so..

Regards,

Felix    

Participant
September 12, 2012

What I did was extended the CalloutButton and overrided the partAdded function to hide the callout window:

override protected function partAdded(partName:String, instance:Object):void{

                              if (partName == "dropDown"){

                                        instance.visible = false;

 

                              }

}

You also need to make it so the button's skin state stays in the down state stays down when you click off of the button.