Flex 4 Stylename stacking

It isn’t going to make headlines but being able to apply multiple styles to a component in Flex 4 is great. I find that it really helps keep my CSS more organized and modular. Below is a simple example in which you can apply many different styles to the same <TextInput>. –> –>

You Might Also Like...

  • Excerpt: Modular Application Development

    482 readersHere's another excerpt from my new book "Professional Flex 3", Chapter 66: Modular Application Development. There is a ton of useful material in this book, from 8 authors, so go check it out! Chapter 66: Modular Application Development When building Flex applications, you may find it necessary to take a modular approach to the application

  • Excerpt: Modular Application Development

    797 readersHere's another excerpt from my new book "Professional Flex 3", Chapter 66: Modular Application Development. There is a ton of useful material in this book, from 8 authors, so go check it out! Chapter 66: Modular Application Development When building Flex applications, you may find it necessary to take a modular approach to the application

  • Two-way Data Binding in Flex 4

    428 readersIn Flex 3 we created a data binding expression using curly braces, like so (brackets left off intentionally): TextInput label="textInput1" TextInput label="textInput2" text="{textInput1.text}" In Flex 3 if you wanted to make the binding two-way, you had to make a second binding expression. However, in Flex 4 you can just add an @ sign to the

  • Setting cursor position at the end of a TextInput control

    444 readersBelow code shows you how to set cursor position at the end of a TextInput control in Flex 4. import mx.events.FlexEvent; // Flex 4 private function creationComplete(event:FlexEvent):void { textInput.selectRange(textInput.text.length, textInput.text.length + 1); textInput.setFocus(); }

  • Styling individual thumbs in the MX HSlider control in Flex

    507 readersThe following example shows how you can apply styles to individual thumbs in a MX HSlider control in Flex by calling the getThumbAt() method to get a specific thumb and then calling the setStyle() method to apply the styles. Full code after the jump. <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2010/01/07/styling-individual-thumbs-in-the-mx-hslider-control-in-flex/ --> <mx:Application name="HSlider_getThumbAt_setStyle_test" [...]

  • Setting the letter spacing on the Spark TextInput control in Flex 4

    686 readersThe following example shows how you can set the letter spacing on the Spark TextInput control in Flex 4 by setting the trackingLeft and trackingRight styles. <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2010/02/10/setting-the-letter-spacing-on-the-spark-textinput-control-in-flex-4/ --> <s:Application name="Spark_TextInput_trackingLeft_test" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"> [...]

  • Setting the letter spacing on the Spark TextInput control in Flex 4

    472 readersThe following example shows how you can set the letter spacing on the Spark TextInput control in Flex 4 by setting the trackingLeft and trackingRight styles. <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2010/02/10/setting-the-letter-spacing-on-the-spark-textinput-control-in-flex-4/ --> <s:Application name="Spark_TextInput_trackingLeft_test" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"> [...]

  • F3 v. F4: Boxes v Groups

    406 readersLayouts are something that has changed a lot with Flex 4. There are several ways to accomplish your layout. Here is a simple Flex 3 example where we wanted to horizontally layout two vertical groupings of Label and TextInput components. 12345678910<mx:HBox horizontalCenter="0" verticalCenter="0">     <mx:VBox>         <mx:Label text="First name:"/>    

  • Comparing Apples To Oranges with Flex

    510 readersOccasionally you might find the need to compare completely unrelated data in your applications. This may sound a bit odd, but it does happen, especially in cases where you may want to observe and compare trends within your data sets. This could include completely different data sets, using different value ranges on both axes, with

  • Lightweight AS2 Flash Lite framework

    183 readersVia Forum Nokia, shagarah posted a great resource that he created, a Lightweight AS2 Flash Lite framework. Right-To-Left and Left-To-Right interface, which helps in languages like Arabic & Urdu. Screen Rotation Touch Screens Grid, List and Tab menu controls Simple Image Viewer Simple Audio Player Simple Video Player Event Manager SharedObject Manager Socket Client It

'>How to create a top quality logo for your company
  • Remove a Section of Your Photo
  • Subscribe to RSS headline updates from: GurusUnleashed
    Powered by FeedBurner

  • Design & Career Resources

    Open design job and RFQ/RFP listings for Thursday, 29 July Courtesy of Design Jobs Live!
    The latest resources and free stuff (like textures, fonts, Photoshop brushes, scripts, plug-ins, and much more!) from workflowFreelance.com. Read more!
    The latest headlines from workflowFreelance.com. Read more!
  • Popular Search Terms

    Curious what others are searching for? Below are the most popular search terms over the last 30 days.