I've found that i've been constantly typing width="100%" height="100%"
and so on for containers within containers and what not, and have
found it to be tedious task.

The thing is though, sometimes i want width="100%" but height to be
default (ie whatever the height of the movieclip in question)

but most of the time i've wanted 100% for both metrics for a typical container.

To combat this i put together a buch of custom MXML components that
simply use the MX built-in ones, but on initialize they simply setup
some default settings (margins, width/height etc)

At the same time i have an attribute like autoHeight=false|true which
will set the height to 100% or don't automatically define the height

so the code looks like:

public var autoHeight:Boolean = true;

function autoLayout() {
        if(autoHeight) {
            height = height || "100%";
        }

}

then when i want to use an autoLayout container i would do this:

<inco:VBox>
//... Stuff here.

</inco:VBox>

Now, does anyone else do something similiar? or have found it a
repetitive task? have i overlooked an attribute setting somewhere - (I
had thought of using CSS but thats not as agile as my autoLayout
capabilities)



-- 
Regards,
Scott Barnes
http://www.mossyblog.com
http://www.flexcoder.com (Coming Soon)


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to