Flex Datagrid 's tooltip using the itemRollOut event

          Flex Datagrid 's tooltip using the itemRollOut event

          Datagrid Flex component is a very powerful tool to display data. For an enterprise application we're trying to create a tooltip only if the content of the row data is bigger than the width of the row.
          We solved the problem using the itemRenderer, but I had some strange behaviours using the itemRollOver.
          The itemRollOver is an event of the  ListBase class, the base class for controls that represent lists of items that can have one or more selected and can scroll through the items.
          This is the MXML code :

          <myComp:DataGrid
               id="myDG"
               dataProvider="{commandList.command}"
               itemRollOut="destroyBigTip(event)"
               itemRollOver="createBigTip(event)"         
               editable="true"
               width="290"/>

          These are the two event handler functions :

              public function createBigTip(event:Object):void {
             
              var s:String = "Over"
          var label:Label = new Label;
          label.text = s;
          label.setVisible(true);
          label.x = 10;
          label.y = 10;

          addChild(label);
              
             }

             
              public function destroyBigTip(event:Object):void {
             
              var s:String = "Out"
          var label:Label = new Label;
          label.text = s;
          label.setVisible(true);
          label.x = 10;
          label.y = 10;

          addChild(label);
              
             }

          All that works just for the first row of the Datagrid !

          posted on 2007-05-08 17:20 leoli 閱讀(1095) 評(píng)論(0)  編輯  收藏 所屬分類: Flex

          導(dǎo)航

          <2025年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          統(tǒng)計(jì)

          常用鏈接

          留言簿(6)

          隨筆分類

          隨筆檔案(17)

          文章分類(86)

          收藏夾(3)

          flex blog

          good site

          java blog

          my friend

          tools

          抓蝦

          搜索

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 来宾市| 手游| 霸州市| 凤庆县| 大英县| 遵义市| 孝义市| 保康县| 黄平县| 台东市| 鱼台县| 嘉峪关市| 于都县| 清新县| 灵山县| 千阳县| 镇雄县| 同仁县| 洪雅县| 汨罗市| 汶上县| 景宁| 和田市| 红原县| 巴彦县| 屏边| 延长县| 伊春市| SHOW| 旬阳县| 玉林市| 科技| 菏泽市| 涞源县| 丹江口市| 西乌| 微博| 肥乡县| 新昌县| 金川县| 甘肃省|