Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can do it Using Style + Code like this</p> <p>Define <strong>Style Properties</strong> as </p> <pre><code>Alert { height:300; weight:300; } </code></pre> <p>Note: <strong>height</strong> and <strong>weight</strong> are <strong>not</strong> default style of <strong>Alert</strong></p> <p>Using them in <strong>Code</strong> as</p> <pre><code>var alert:Alert = Alert.show("Hello World"); alert.explicitHeight = Number(alert.getStyle("height")); alert.explicitWidth = Number(alert.getStyle("weight")); </code></pre> <p>Working example of Flex3 is</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="{show()}"&gt; &lt;mx:Style&gt; Alert { height:300; weight:300; } &lt;/mx:Style&gt; &lt;mx:Script&gt; &lt;![CDATA[ import mx.controls.Alert; private function show():void { var alert:Alert = Alert.show("Hello World"); alert.explicitHeight = Number(alert.getStyle("height")); alert.explicitWidth = Number(alert.getStyle("weight")); } ]]&gt; &lt;/mx:Script&gt; &lt;/mx:Application&gt; </code></pre> <p>Explanation</p> <p>Since <strong>Alert</strong> Control by default <strong>not</strong> support <strong>height</strong> and <strong>weight</strong> <em>style</em>, so example used them just for <strong>holding</strong> user defined <strong>values</strong> as variable.</p> <p>In routine to display <em>Alert/Popup</em> on screen <strong>Static</strong> method <strong>show</strong> of class <strong>Alert</strong> is used, which returns the <strong>instance/object</strong> of <strong>created/active</strong> Alert/Popup, using this refrence its properties can be manipulated at runtime as done in above example i.e. <strong>explicitHeight</strong> and <strong>explicitWidth</strong>.</p> <p>Hopes that Help</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload