1 person found this helpful
It's hardly achievable via mxml, but you could do that from AS3 script, name your button with an id say = 'btn'
and put your conditional logic inside mx:Script
btn.percentHeight = switch ? 100 : 20;
I think percentHeight should work as an attribute so you could bind to the ternary expression too. It's not the best use of binding but it works OK.
And as well I'm not a big lover of any logic inside attributes, but anyway that's cool and looks astonishing, Thanks Matt!
Thanks guy! This works great.
There is a secret piece of metadata called
that you can use... It redirects percentage values elsewhere.
Take a look at UIComponent.get height()