3 Replies Latest reply on Mar 21, 2012 4:07 AM by nandankishor

    Itemrenderer which has a checkbox and textarea

    nandankishor

      Hi all,

       

      I m very new to flex,

       

      I need a itemrenderer which has a 4 checkbox without multiple selections* and a textarea to display a selected checkbox's label/data.

       

      thanks in advance

        • 1. Re: Itemrenderer which has a checkbox and textarea
          C_5_Johnson

          Piotr Walczyszyn, Adobe evangalist, explains building a custom IconItemRenderer for a Flex Mobile project in Flashbuilder 4.5/4.6.

           

          This video applies to LabelItemRenderer's as well, can be used in none-mobile projects, and will give you all the basics you need to get started building and positioning your content (4 checkboxed and a textarea) in your custom item renderer.

           

          http://tv.adobe.com/watch/adc-presents/create-itemrenderers-for-flex-mobile-projects/

           

          The only part that it won't cover in detail is itemRenderer events - you're on your own for that! Good luck!

          • 2. Re: Itemrenderer which has a checkbox and textarea
            C_5_Johnson Level 1

            Also, even though it's a little out of date, make sure you read and understand Peter Ent's five-part 'Understanding Flex itemRenderer's' article series.

             

            http://www.adobe.com/devnet/flex/articles/itemrenderers_pt1.html

             

            Part 3 was especially useful for me, as it explains why you should NEVER directly communicate with an itemRenderer - concepts like these are not explained in the AS3 documentation, and are invaluable when architecting Flex applications that use custom itemRenderers and getting them to work with List's or other containers.

            1 person found this helpful
            • 3. Re: Itemrenderer which has a checkbox and textarea
              nandankishor Level 1

              @C_5_Johnson

               

              thank u it helped me ....

               

              But i am using radiobutton for that..here is that code

               

                  <mx:Script>

                      <![CDATA[  

               

               

                          import flash.events.Event;

                          import mx.events.ItemClickEvent;

               

               

                                            private function handleCard(event:ItemClickEvent):void {

                                                      myTA.text = "";

               

               

                                                      if(air_temp.selected) {

                                                      myTA.text += "air_temp";

                                                      }

               

               

                                                      if(atmo_press.selected) {

                                                      myTA.text += "atmo_press";

                                                      }

               

               

                                                      if(humidity.selected) {

                                                      myTA.text +="humidity";

                                                      }

               

               

                                                      if(rain_fall.selected) {

                                                      myTA.text +="rain_fall";

                                                      }

                                            }

               

               

                      ]]>

                  </mx:Script>

                 

                  <mx:RadioButtonGroup id="param" itemClick="handleCard(event);"/>

                  <mx:RadioButton groupName="param" id="air_temp" label="Air Temparature" width="150"/>

                  <mx:RadioButton groupName="param" id="atmo_press" label="Atmospheric Pressure" width="150"/>

                  <mx:RadioButton groupName="param" id="humidity" label="Humidity" width="150"/>

                  <mx:RadioButton groupName="param" id="rain_fall" label="Rainfall" width="150"/>

                     

                  <mx:TextArea id="myTA"/>

              1 person found this helpful