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 閱讀(1091) 評論(0)  編輯  收藏 所屬分類: Flex

          導航

          <2025年5月>
          27282930123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          統計

          常用鏈接

          留言簿(6)

          隨筆分類

          隨筆檔案(17)

          文章分類(86)

          收藏夾(3)

          flex blog

          good site

          java blog

          my friend

          tools

          抓蝦

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 门头沟区| 容城县| 辰溪县| 林口县| 哈尔滨市| 柳州市| 唐河县| 清远市| 云和县| 偏关县| 三穗县| 资源县| 长海县| 遵义县| 舒城县| 富平县| 湘潭市| 宁强县| 莒南县| 临沧市| 康保县| 宜阳县| 黔江区| 枣强县| 临猗县| 连云港市| 茂名市| 同心县| 阳泉市| 大名县| 昆山市| 沁水县| 平乡县| 中西区| 于田县| 廉江市| 邵武市| 沧源| 攀枝花市| 丰宁| 拉萨市|