2 Replies Latest reply on Apr 27, 2012 6:15 AM by loki2357

    Icon blocking rollover, click, drag etc

    loki2357 Level 1

      Hi,

       

      I have a problem with custom icons in an advanced datagrid where they are blocking the rollover (item does not have blue item selected ribbon on rollover of the icon but does when I roll over the text) and most importantly I can't drag the item from the icon but can drag it from the text.  Next to the adg is a tree which uses the same icons and same tree icon funtion but this does not have the same problem so I am guessing it is something to do with the adg.  Has anyone come across this before?  I can't find anything relating to this problem online.

       

      Thanks,

      Mike

        • 1. Re: Icon blocking rollover, click, drag etc
          loki2357 Level 1

          Here is a simple example which shows the problem, if you comment out adg and comment in tree it works fine:

           

          <?xml version="1.0" encoding="utf-8"?>

          <mx:Application

                    xmlns:mx="http://www.adobe.com/2006/mxml"

                    layout="vertical"

                    minWidth="955"

                    minHeight="600">

           

                    <mx:Script>

                              <![CDATA[

                                        import mx.collections.ArrayCollection;

                                        import mx.collections.HierarchicalData;

                                        import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;

                                        import mx.events.FlexEvent;

           

           

                                        [Bindable]

                                        private var fdp:ArrayCollection = new ArrayCollection([

                                                  {Region:"Southwest", Territory:"Arizona", Territory_Rep:"Barbara Jennings", Actual:38865, Estimate:40000, icon:"flex"},

                                                  {Region:"Southwest", Territory:"Arizona", Territory_Rep:"Dana Binn", Actual:29885, Estimate:30000, icon:"flex"}, 

                                                  {Region:"Southwest", Territory:"Central California", Territory_Rep:"Joe Smith", Actual:29134, Estimate:30000, icon:"flex"}, 

                                                  {Region:"Southwest", Territory:"Nevada", Territory_Rep:"Bethany Pittman", Actual:52888, Estimate:45000, icon:"flex"}, 

                                                  {Region:"Southwest", Territory:"Northern California", Territory_Rep:"Lauren Ipsum", Actual:38805, Estimate:40000, icon:"flex"},

                                                  {Region:"Southwest", Territory:"Northern California", Territory_Rep:"T.R. Smith", Actual:55498, Estimate:40000, icon:"flex"}, 

                                                  {Region:"Southwest", Territory:"Southern California", Territory_Rep:"Alice Treu", Actual:44985, Estimate:45000, icon:"flex"},

                                                  {Region:"Southwest", Territory:"Southern California", Territory_Rep:"Jane Grove", Actual:44913, Estimate:45000, icon:"flex"}

                                        ]);

           

           

                                        [Bindable]

                                        [Embed(source="assets/flex.png")]

                                        public var flexIcon:Class;

           

           

           

                                        private function tree_iconFunc(item:Object):Class {

                                                  var iconClass:Class;

                                                  trace("tree_iconFunc");

                                                  switch (item.icon) {

                                                            case "flex":

                                                                      iconClass = flexIcon;

                                                                      break;

                                                  }

                                                  return iconClass;

                                        }

           

                              ]]>

                    </mx:Script>

           

                    <!--<mx:Tree

                              dataProvider="{fdp}"

                              width="500"

                              height="500"

                              iconFunction="tree_iconFunc"/>-->

           

           

                    <mx:AdvancedDataGrid

                              width="500"

                              height="500"

                              iconFunction="tree_iconFunc"

                              initialize="gc.refresh()">

           

                              <mx:dataProvider>

                                        <mx:GroupingCollection

                                                  id="gc"

                                                  source="{fdp}">

                                                  <mx:grouping>

                                                            <mx:Grouping>

                                                                      <mx:GroupingField name="Region"/>

                                                                      <mx:GroupingField name="Territory"/>

                                                            </mx:Grouping>

                                                  </mx:grouping>

                                        </mx:GroupingCollection>

                              </mx:dataProvider>

           

                              <mx:columns>

                                        <mx:AdvancedDataGridColumn

                                                  id="regionColumn"

                                                  headerText="Region"

                                                  dataField="Region"/>

                                        <mx:AdvancedDataGridColumn

                                                  id="territoryColumn"

                                                  headerText="Territory"

                                                  dataField="Territory"/>

                                        <mx:AdvancedDataGridColumn

                                                  id="repColumn"

                                                  headerText="Territory Rep"

                                                  dataField="Territory_Rep"/>

                              </mx:columns>

           

                    </mx:AdvancedDataGrid>

           

          </mx:Application>

           

           

          I am using sdk 3.6

           

          Here is the asset:

           

          flex.png

          • 2. Re: Icon blocking rollover, click, drag etc
            loki2357 Level 1

            Ok, so I've come to the conclusion that this is a bug.  It exists in the Adobe help examples here:

             

            http://livedocs.adobe.com/flex/3/html/help.html?content=advdatagrid_06.html

             

            in the example in the section "Setting navigation tree icons and labels"

             

            and at the bottom of the page the user SPGAnne has exactly the same problem and the Administrator is to file a bug.

             

            I guess there's nothing I can do from here...

             

            Mike