1 Reply Latest reply on Dec 29, 2009 10:10 AM by Gregory Lafrance

    Flex and CSS

    Ali_Hwth

      I've created a short xml-style list in Flex 3, and I'm trying to style it.,
      Is it possible in Flex to target particular elements? For example, I would like the first line to be bolder.

      How do I go about that?

      This is the MXML:

      <?xml version="1.0" encoding="utf-8"?>
           <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
                <mx:Style>
                     Application { font-size: 24; }
                     .firstname { font-size: 20; }
                </mx:Style>
                <mx:XMLList id="customers" xmlns="">
                     <customer >
                          <first>Jack</first>
                          <last>Herrington</last>
                     </customer>
                     <customer>
                     <first>Lori</first>
                          <last>Herrington</last>
                     </customer>
                     <customer>
                          <first>Megan</first>
                          <last>Herrington</last>
                     </customer>
                </mx:XMLList>
                <mx:VBox styleName="listOne">
                     <mx:DataGrid dataProvider="{customers}" editable="true" width="400">
                     <mx:columns>
                          <mx:DataGridColumn dataField="first" id="firstname" />
                          <mx:DataGridColumn dataField="last" />
                     </mx:columns>
                </mx:DataGrid>
                </mx:VBox>
           </mx:Application>
        • 1. Re: Flex and CSS
          Gregory Lafrance Level 6

          If you mean you want the text in the first DataGrid column to be bold, you could create an itemRender and set the text to bold.

           

          If this post answers your question or helps, please mark it as such.


          Greg Lafrance - Flex 2 and 3 ACE certified
          www.ChikaraDev.com

          Flex Development, Training, and Support Services

          1 person found this helpful