defaultButton property in HBox control of Flex.

I found out one property that was actually hidden in the Control of HBox, i had a requirement and when i searched for that i found that hidden one.

And its really very use full in using that property and the functionality of defaultButton is know i think[ One reading this post] .

code example:

<mx:HBox defaultButton=”{btn}” >
<mx:Button id=”btn” label=”One”/>
<mx:Button id=”btnbtn” label=”Two”/>
<mx:Button id=”btnbtn” label=”Three”/>
</mx:HBox>

This property will also be defined in the other Alingment Tags.Enjoy the code.

Advertisements

6 Responses to defaultButton property in HBox control of Flex.

  1. cease says:

    .mxml:[18,-1] Initializer for ‘defaultButton’: values of type mx.core.IFlexDisplayObject cannot be represented in text.

    didn’t work for me

  2. kumargandhi says:

    Hi
    May you r missing something,It should work. Can you paste the sample code here.

    regards,
    kumar.

  3. Toby says:

    Actually, the sample isn’t quite right. Curly braces are needed around the value of defaultButton as in:

  4. Toby says:

    Oops – the code was munged. Should be defaultButton=”{btn}”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: