[flexcoders] How to create new custom Style in custom component?
Hi FlexCoders, I'm wondering how I can create new custom style in my ActionScript Component? And how to use it with StyleManager? Can anybody point me to documentation where this topic is described? Best regards Stanislav -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 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/
RE: [flexcoders] How to create new custom Style in custom component?
Sure, there is a chapter on this topic in the Creating Components book at: http://livedocs.macromedia.com/labs/1/flex20beta2/1813.html Stephen -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Stanislav Zayarsky Sent: Thursday, March 23, 2006 11:30 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] How to create new custom Style in custom component? Hi FlexCoders, I'm wondering how I can create new custom style in my ActionScript Component? And how to use it with StyleManager? Can anybody point me to documentation where this topic is described? Best regards Stanislav -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 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/
Re: [flexcoders] How to create new custom Style in custom component?
I believe the simplest way is to look in the generated code - it gives you the better understanding on both code and timing. The code would go like this: .. var style:CSSStyleDeclaration;style = StyleManager.getStyleDeclaration(".yourStyleName");if (!style){style = new CSSStyleDeclaration();StyleManager.setStyleDeclaration(".yourStyleName", style, false);}if (style.factory == null){style.factory = function():void{this.paddingBottom = 0;this.paddingTop = 0;};} Hope this helps, Anatole Tartakovsky - Original Message - From: Stanislav Zayarsky To: flexcoders@yahoogroups.com Sent: Thursday, March 23, 2006 11:29 AM Subject: [flexcoders] How to create new custom Style in custom component? Hi FlexCoders,I'm wondering how I can create new custom style in my ActionScriptComponent? And how to use it with StyleManager?Can anybody point me to documentation where this topic is described?Best regardsStanislav -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. 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] How to create new custom Style in custom component?
Thanks Anatole, This helps! Best regards Stanislav On 3/23/06, Anatole Tartakovsky [EMAIL PROTECTED] wrote: I believe the simplest way is to look in the generated code - it gives you the better understanding on both code and timing. The code would go like this: .. var style:CSSStyleDeclaration; style = StyleManager.getStyleDeclaration(.yourStyleName); if (!style) { style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(.yourStyleName, style, false); } if (style.factory == null) { style.factory = function():void { this.paddingBottom = 0; this.paddingTop = 0; }; } Hope this helps, Anatole Tartakovsky - Original Message - From: Stanislav Zayarsky To: flexcoders@yahoogroups.com Sent: Thursday, March 23, 2006 11:29 AM Subject: [flexcoders] How to create new custom Style in custom component? Hi FlexCoders, I'm wondering how I can create new custom style in my ActionScript Component? And how to use it with StyleManager? Can anybody point me to documentation where this topic is described? Best regards Stanislav -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Original Message - From: Stanislav Zayarsky To: flexcoders@yahoogroups.com Sent: Thursday, March 23, 2006 11:29 AM Subject: [flexcoders] How to create new custom Style in custom component? Hi FlexCoders, I'm wondering how I can create new custom style in my ActionScript Component? And how to use it with StyleManager? Can anybody point me to documentation where this topic is described? Best regards Stanislav -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 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/
Re: [flexcoders] How to create new custom Style in custom component?
Thanks Stephen, I suppose it will work with Flex 1.5 too? Best regards Stanislav On 3/23/06, Stanislav Zayarsky [EMAIL PROTECTED] wrote: Thanks Anatole, This helps! Best regards Stanislav On 3/23/06, Anatole Tartakovsky [EMAIL PROTECTED] wrote: I believe the simplest way is to look in the generated code - it gives you the better understanding on both code and timing. The code would go like this: .. var style:CSSStyleDeclaration; style = StyleManager.getStyleDeclaration(.yourStyleName); if (!style) { style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(.yourStyleName, style, false); } if (style.factory == null) { style.factory = function():void { this.paddingBottom = 0; this.paddingTop = 0; }; } Hope this helps, Anatole Tartakovsky - Original Message - From: Stanislav Zayarsky To: flexcoders@yahoogroups.com Sent: Thursday, March 23, 2006 11:29 AM Subject: [flexcoders] How to create new custom Style in custom component? Hi FlexCoders, I'm wondering how I can create new custom style in my ActionScript Component? And how to use it with StyleManager? Can anybody point me to documentation where this topic is described? Best regards Stanislav -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Original Message - From: Stanislav Zayarsky To: flexcoders@yahoogroups.com Sent: Thursday, March 23, 2006 11:29 AM Subject: [flexcoders] How to create new custom Style in custom component? Hi FlexCoders, I'm wondering how I can create new custom style in my ActionScript Component? And how to use it with StyleManager? Can anybody point me to documentation where this topic is described? Best regards Stanislav -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 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/
RE: [flexcoders] How to create new custom Style in custom component?
That will work for Flex 2.0 only. Stephen -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Stanislav Zayarsky Sent: Thursday, March 23, 2006 12:13 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] How to create new custom Style in custom component? Thanks Stephen, I suppose it will work with Flex 1.5 too? Best regards Stanislav On 3/23/06, Stanislav Zayarsky [EMAIL PROTECTED] wrote: Thanks Anatole, This helps! Best regards Stanislav On 3/23/06, Anatole Tartakovsky [EMAIL PROTECTED] wrote: I believe the simplest way is to look in the generated code - it gives you the better understanding on both code and timing. The code would go like this: .. var style:CSSStyleDeclaration; style = StyleManager.getStyleDeclaration(.yourStyleName); if (!style) { style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(.yourStyleName, style, false); } if (style.factory == null) { style.factory = function():void { this.paddingBottom = 0; this.paddingTop = 0; }; } Hope this helps, Anatole Tartakovsky - Original Message - From: Stanislav Zayarsky To: flexcoders@yahoogroups.com Sent: Thursday, March 23, 2006 11:29 AM Subject: [flexcoders] How to create new custom Style in custom component? Hi FlexCoders, I'm wondering how I can create new custom style in my ActionScript Component? And how to use it with StyleManager? Can anybody point me to documentation where this topic is described? Best regards Stanislav -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Original Message - From: Stanislav Zayarsky To: flexcoders@yahoogroups.com Sent: Thursday, March 23, 2006 11:29 AM Subject: [flexcoders] How to create new custom Style in custom component? Hi FlexCoders, I'm wondering how I can create new custom style in my ActionScript Component? And how to use it with StyleManager? Can anybody point me to documentation where this topic is described? Best regards Stanislav -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group flexcoders on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 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/