flex - create HBox component with default values -
I want to create an HBox component; For example, HLBox that actually behaves like a HBox but its default width and height is 100%.
How can I do this?
Create a HLBox.mxml
file and add the following code to it.
& lt ;! - HLBox.mxml - & gt; & Lt; Mx: HBox xmlns: mx = "http://www.adobe.com/2006/mxml" width = "100%" height = "100%" /> Use
and HLBox
as you HBox
& lt; HLBox & gt; & Lt ;! - Do not specify the width or height attributes for the HLBox tag, it will overwrite the default - & gt; & Lt; Mx: label text = "something" /> & Lt ;! - Other children - & gt; & Lt; / HLBox & gt;
Comments
Post a Comment