I want to create a HBox component name for example HLBox that behaves exactly like an HBox but ha s as default width and height 100%.
How can I do that?
I want to create a HBox component name for example HLBox that behaves exactly like an HBox but ha s as default width and height 100%.
How can I do that?
Create a HLBox.mxml
file and add the following code to it.
<!-- HLBox.mxml -->
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
width="100%" height="100%"/>
And use HLBox
as you would use HBox
<HLBox>
<!-- Don't specify width or height attributes to HLBox tag,
it will overwrite the default ones -->
<mx:Label text="something"/>
<!-- other children -->
</HLBox>