How can I have conditional percentage in MXML?

I love the fact that you can set a components width or height to a percentage of its parent container.
<mx:Button height="100%" />
What I would like to do is have a conditional percentage based on some bindable boolean
[Bindable] public var switch:Boolean = true;
<mx:Button height="{switch ? '100%' : '20%'}" />
Unfortunately I get an error saying that I can't use a string in place of a number.  I also tried this syntax and it still wont work,
<mx:Button height="{switch ? 100% : 20%}" />
Any suggestions?  Is this even possible?  Thanks.

There is a secret piece of metadata called [PercentProxy(
"percentHeight")]
that you can use... It redirects percentage values elsewhere.
Take a look at UIComponent.get height()

Similar Messages

  • How can I have the pricing conditions at the item and header level of the d

    How can I have the pricing conditions at the item and header level of the delivery? There exist "condition" tabs both the header and the item level of the delivery but the contents of the tabs are empty. I'll be happy if you can help me. Thanks in advance....

    Hi
    If you want to have the pricing procedure at delivery level then you need to assign a pricing procedure at delivery level also
    Just go through the path to maintain the pricing procedure at delivery level.
    IMG -> Logistics execution -> Shipping -> Basic Shipping Functions -> Pricing -> Pricing Procedure. for Delivery.
    But can you be more clear if the above one is not your query ?
    Regards
    Srinath

  • When I open a jpeg image at 100% is too large to see. How can I change the percentage to be able to view document?

    When I open a jpeg image at 100% is too large to see. How can I change the percentage to be able to view document?
    == This happened ==
    Every time Firefox opened

    You have to change the settings in whatever program you use to open the jpg. Firefox has no control over that. What program do you use to open jpg?

  • How can i compare in percentage, vowels and consonants in english and german language?

    how can i compare in percentage, vowels and consonants in english and german language?

    Hi,
    Try comparing the Unicode value of the characters, see the code samples in these threads:
    Generating unicode
    for arabic character similar to Character map in c#
    How
    do you get the numeric unicode value of a  character?
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can I have the articles listed for all of the asssortments?

    How can I have the articles listed for all of the asssortments without any condition? Is there any customization for this?

    Can you make some explanation? Is it OK if I choose "02 - Listing without qualification" as listing procedure?

  • How can I have multiple users on iTunes (in order to connect to a shared office iPad)?

    How can I have multiple users on iTunes (in order to connect to a shared office iPad)? Currently each of us has our own iTunes account, so I've made an "all office" Apple ID. However, I can't seem to get two different accounts (my personal and the office) to work on my machine. Even when I login as "the office", my personal library is still showing. Additionally, when I try to setup with a first-time use in iTunes, I get an error that I don't meet the minimum age requirement - no matter what birthdate I enter!

    The library exists regardless of which user is logged in.
    The only way around that is to create different user accounts on the computer.
    There is no way to have 20 unique iTunes users access a shared iTunes under a single login on the computer.

  • I have OSX Maverick on an iMac using Outlook e-mail.  PDF attachments are included in the e-mail  as the whole document rather than just the PDF icon.  How can i have just the PDF icon as an attachment?

    In Outlook my PDF attachments appear as whole documents and not just the PDF icon.  How can I have attachments included as PDF icons and not the documents?

    For your own viewing, you can of course control-click on the attachment and select "View as Icon".
    For others' viewing, it depends upon their email reader.  To ensure that attachments are not displayed expicitly you can put them all in a zip file (via control click and "Compress") then attaching them, or you can use third party stuff like Attachment Tamer.
    charlie

  • On my mac when i click on pages, a new document doesn't open instantly  but a window with my files open and then  have to click on the left bottom new document in order to open one. How can i have directly a new document when i click on pages icon

    On my mac when i click on pages, a new document doesn't open instantly  but a window with my files open and then  have to click on the left bottom < new document> in order to open one. How can i have directly a new document when i click on pages icon

    How to open an existing Pages document?
    Click Pages icon in the Dock to launch Pages.
    When Pages is open, click File menu in the  Pages menu bar.
    Select “Open”.
    When the select document  dialog box opens up, highlight/select the document and click “Open”
    at the bottom right corner of the dialog box.
    s
    https://support.apple.com/kb/PH15304?locale=en_US

  • How can I have two itunes accounts on one computer?

    How can I have two itunes accounts on one computer?

    Not sure what you mean.
    An account is a user name and password.
    Sign into whichever account you want to use for purchasing.
    Authorize the computer for both account to listen to the content.

  • How can I have two different windows up on one screen at the same time?

    How can I have to different windows open on my screen at one time? Kind of like a split or shared screen.

    If you want this split screen thingy for a single app, do like captfred suggests or see if the app itself supports some sort of splitting, like MS Excel.
    If you want to do this system-wide, maybe you can get what you want by activating and using Spaces: http://support.apple.com/kb/PH4313

  • How can I make the background one solid color?  It is too difficult and noticeable when I use the retouch button and try to erase all the creases in my backdrop.  So, how can I have just a solid white background?

    How can I make the background one solid color?  It is too difficult and noticeable when I use the retouch button and try to erase all the creases in my backdrop.  So, how can I have just a solid white background?

    When talking about a specific image posting the image may be useful.
    One can use a Layer Mask and add a white Layer underneath.

  • How can we have two different Itunes libraries on one computer?

    How can we have two Itunes accounts on one computer?  I found info on the itunes help page but I do not know how to follow the steps given because I am not prompted with what it says I should be prompted with? Please help I don't want to delete one of our libraries

    Launch iTunes with the Shift key held down as needed, or use different Windows XP user accounts.
    (74282)

  • How can I have multiple users on one apple id?

    How can I have multiple users on one apple ID?
    ie: I have my apple ID with my own credit, how can I set up credit for my son under the same apple ID, so that he can still access the same apps I've already downloaded and paid for?

    I've been trying to figure out a clean way to do this too. I think you may need more than one Apple ID – one that is shared and used to purchase "sharable" items and then "individual" Apple IDs for you and your son. That's the idea that I'm pursuing for the moment.
    It seems that there must be a way to do this, App Store purchases for the Mac are licensed across multiple machines. iPhone app purchases have "all your devices" licensing. Makes me think that Apple has a process in mind for sharing an account (or associating a device with multiple accounts).
    Other things I've learned:
    - Apparently you can't merge Apple ID accounts. I asked about this once at an Apple Store and was told that there was no way to do it.
    - If you share an Apple ID the Messages app behaves in a somewhat surprising manner. It must use your Apple ID to decide where messages should be sent because all users get all messages. This can make it very hard to organize a surprise party :-)

  • How can I have one "family" Apple ID and two icloud accounts one for me and one for the wife?

    MacVirgin!Just got new Air and iMac (iphones on the way). How can I have one Apple ID but two iCloud accounts (one for me and one for my wife)? I have set up one iCloud account and am attempting to share contacts between iMac, iCloud and Air, however iMac and iCloud are not in sync? I must be missing something very simple.

    ok. I set up the imac and Air with one user account. this was used to activae iCloud on both machines and I have now se up one iCloud account and managed to share calander and contacts between the two. Ultimately both me and my wife will have an iphone and we wish to share calenders and contacts. We both also use the imac and air on one user account. It looks like I need to set another user account then activate iCloud in my wifes Apple ID

  • How can I have 2 devices on one iTunes?

    How can i have 2 devices on one iTunes so that they share the same music but have different apps? Is there a way to do that?

    Each can sync with the same playlists, or different ones, and can have different apps...
    Uncheck the Automatically sync new apps box on the Apps tab after connecting each device and before syncing. Once this box has been unchecked each device should remember the setting and only sync the apps that have already been selected for it, plus any you then decide to manually add to the list or purchase on each respective device.
    tt2

Maybe you are looking for

  • Windows 8 to windows 8.1 restart problem

    Installes windows 8.1 and pc keeps restarting Hi i have HaP G62-80SV and update from windows 8 to windows 8.1. The pc opens and after a few minutes restarts and this happens again and again.. This happens because display adapters dont have the proper

  • DB2 on Solaris x64 - ZFS as filesystem possible?

    Environment: Solaris 10 5/08 Full root zone Tablespaces on loopback mounted ZFS filesystem DB2 LUW 9.5 FP2a The installation was smooth and worked. After some days I encountered crashes. db2diag was telling "something like" "filesystem ZFS not suppor

  • Unhappy Face and Not Working Disk Mode

    I am getting an unhappy face when i try to open my ipod, my windows doesnt recognize the ipod also. So I decided to run in disk mode and restore the Apple Software. The problem is when I run my iPod in Disk Mode and when I connect it, my iPod reboots

  • Oracle to SAP, worth it?

    Hello folks , Ive been reading up about all the advice regarding the SAP training/certification and  though there seems no black or white ,Im hoping to get some useful inputs from the experienced folks . I have worked with an IT biggie for 3 years as

  • Installing OS X applications without installation CDs

    Hello, I was wondering if it were possible to reinstall OS X applications (Address Book, iCal) if I don't have my installation CDs, and if so how I could go about doing this? Thanks!