Font-Style has two values:

1 Normal
2 Italic

if you set the value of Font-Style = italic then you will find that
the text written in that particular component is slanting to the right
and if the value of Font-Style is normal then the letters in the text
would stay vertical.

HTH,

-Ravi

On Mar 16, 9:40 am, Fred45 <[email protected]> wrote:
> I am totally new to Flex and I am starting to learn . This example
> seems more complex to me and I don't understand all the code. I
> understand what the code does but something like "normal" is not
> obvious to me as well as (s). If you somebody has time yo explain to
> me into details what  each lines does I will appreciate deeply. Thanks
> again . Fred.
> <?xml version="1.0"?>
> <!-- usingas/FlexComponents.mxml -->
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>
>   <mx:Script><![CDATA[
>     private var newFontStyle:String;
>     private var newFontSize:int;
>
>     public function changeLabel(s:String):void {
>         s = "myButton" + s;
>
>         if (this[s].getStyle("fontStyle")=="normal") {
>             newFontStyle = "italic";
>             newFontSize = 18;
>         } else {
>             newFontStyle = "normal";
>             newFontSize = 10;
>         }
>
>         this[s].setStyle("fontStyle",newFontStyle);
>         this[s].setStyle("fontSize",newFontSize);
>     }
>     ]]></mx:Script>
>
>     <mx:Button id="myButton1"
>         click="changeLabel('2')"
>         label="Change Other Button's Styles"
>     />
>     <mx:Button id="myButton2"
>         click="changeLabel('1')"
>         label="Change Other Button's Styles"
>     />
> </mx:Application>
--~--~---------~--~----~------------~-------~--~----~
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