hi,

while adding lables from script u can set the width but cannot retrieve
unless unless the width of label isn't fixed. but if u us spark lib object
of label in mxml tag u will get the width.

Regards
Brijesh Kumar
Flex-Flash Developer
9871746836


On Wed, Nov 3, 2010 at 2:15 PM, rabin <[email protected]>wrote:

> Hi.
>
> I want the width of Label control. But unable to do that. Any help ?
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <s:Application
>   xmlns:fx="http://ns.adobe.com/mxml/2009";
>   xmlns:s="library://ns.adobe.com/flex/spark"
>   creationComplete="init()">
>
>
>
>
>
>
> <fx:Script>
>
> <![CDATA[
>
>     import mx.controls.Alert;
>
>     import spark.components.Label;
>
>
>     private var label:Label
>
>
>     private function init():void
>
>     {
>          label = new Label()
>          label.text = "Hello World";
>          addElement(label);
>
>          Alert.show(String(label.width));
>
> }
>
>
> ]]>
>
> </fx:Script>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to