RE: [flexcoders] AutoWidth/AutoHeight?
Hi scott, as a matter of course, I have subclassed all the tags. That way, when any defaults or behavioursirritate me, I have a place to fix them. From: Scott Barnes [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 22, 2005 1:49 PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] AutoWidth/AutoHeight? I've found that i've been constantly typing width="100%" height="100%"and so on for containers within containers and what not, and havefound it to be tedious task.The thing is though, sometimes i want width="100%" but height to bedefault (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 thatsimply use the MX built-in ones, but on initialize they simply setupsome default settings (margins, width/height etc)At the same time i have an attribute like autoHeight=false|true whichwill set the height to 100% or don't automatically define the heightso 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:VBoxNow, does anyone else do something similiar? or have found it arepetitive task? have i overlooked an attribute setting somewhere - (Ihad thought of using CSS but thats not as agile as my autoLayoutcapabilities)-- Regards,Scott Barneshttp://www.mossyblog.comhttp://www.flexcoder.com (Coming Soon) Yahoo! Groups Sponsor ADVERTISEMENT 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 the Yahoo! Terms of Service.
Re: [flexcoders] AutoWidth/AutoHeight?
Your not alone, but extending every component for the sake of defaulting all containers to 100% seems mega-bleh. I wish they'd default to that instead. - Original Message - From: Scott Barnes [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Monday, March 21, 2005 8:48 PM Subject: [flexcoders] AutoWidth/AutoHeight? 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 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/