<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Constraint-based positioning of components using ActionScript 3.0 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/constraint-based-positioning-of-components-using-actionscript-3-0/m-p/4706568#M1105776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am building a Flex3 and ActionScript application. I need to build much of the UI dynamically so I am using ActionScript for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that I can't figure out how use constraint-based positioning for my components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take for example this MXML that instantiates a TitleWindow.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;mx:TitleWindow layout="absolute" id="myid" title="My Window" left="10" right="10" top="10" bottom="10"&amp;gt;
&amp;lt;/mx:TitleWindow&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I can do the same thing in ActionScript...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;var myTitleWindow:TitleWindow = new TitleWindow;
myTitleWindow.id = "myid";
myTitleWindow.layout = "absolute";
myTitleWindow.title="My Window";
this.addChild(myTitleWindow);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;...but I cannot figure out how to set the &lt;STRONG&gt;left, right, top bottom&lt;/STRONG&gt; attributes. I have looked at the generated ActionScript from the MXML example and it uses the stylesFactory property of the mx.core.UIComponentDescriptor class but I can't figure out how to replicate this in my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always I would appreciate anyones help with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham Robbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 16 Nov 2008 23:28:58 GMT</pubDate>
    <dc:creator>GrahamRobbo</dc:creator>
    <dc:date>2008-11-16T23:28:58Z</dc:date>
    <item>
      <title>Constraint-based positioning of components using ActionScript 3.0</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constraint-based-positioning-of-components-using-actionscript-3-0/m-p/4706568#M1105776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am building a Flex3 and ActionScript application. I need to build much of the UI dynamically so I am using ActionScript for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that I can't figure out how use constraint-based positioning for my components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take for example this MXML that instantiates a TitleWindow.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;mx:TitleWindow layout="absolute" id="myid" title="My Window" left="10" right="10" top="10" bottom="10"&amp;gt;
&amp;lt;/mx:TitleWindow&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I can do the same thing in ActionScript...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;var myTitleWindow:TitleWindow = new TitleWindow;
myTitleWindow.id = "myid";
myTitleWindow.layout = "absolute";
myTitleWindow.title="My Window";
this.addChild(myTitleWindow);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;...but I cannot figure out how to set the &lt;STRONG&gt;left, right, top bottom&lt;/STRONG&gt; attributes. I have looked at the generated ActionScript from the MXML example and it uses the stylesFactory property of the mx.core.UIComponentDescriptor class but I can't figure out how to replicate this in my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always I would appreciate anyones help with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham Robbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Nov 2008 23:28:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constraint-based-positioning-of-components-using-actionscript-3-0/m-p/4706568#M1105776</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2008-11-16T23:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint-based positioning of components using ActionScript 3.0</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constraint-based-positioning-of-components-using-actionscript-3-0/m-p/4706569#M1105777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Graham.  Check this out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;var aComponent:yourComponent = new yourComponent();
var theStyle:CSSStyleDeclaration = new CSSStyleDeclaration();
theStyle.setStyle(u201Dtopu201D, 0);
theStyle.setStyle(u201Dbottomu201D, 0);
theStyle.setStyle(u201Dleftu201D, 0);
theStyle.setStyle(u201Drightu201D, 0);
theStyle.setStyle(u201DhorizontalCenteru201D, 0); 
aComponent.styleDeclaration = theStyle;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Nov 2008 23:55:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constraint-based-positioning-of-components-using-actionscript-3-0/m-p/4706569#M1105777</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2008-11-16T23:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint-based positioning of components using ActionScript 3.0</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/constraint-based-positioning-of-components-using-actionscript-3-0/m-p/4706570#M1105778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rich - your response time is not bad either. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham Robbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2008 00:08:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/constraint-based-positioning-of-components-using-actionscript-3-0/m-p/4706570#M1105778</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2008-11-17T00:08:01Z</dc:date>
    </item>
  </channel>
</rss>

