Skip navigation
Currently Being Moderated

disable roll-over-color in List

Jun 18, 2010 9:44 AM

Hi,

I'd like to only use roll-over-text-color in my list, but have no roll-over-color at all. Is there a way to kill the roll over color, as well as the selection color?

Thanks

 
Replies
  • Currently Being Moderated
    Jun 18, 2010 9:50 AM   in reply to upshotvideo

    For mx:List, you subclass and override drawHighlightColor.

     

    In Spark, set autoDrawBackground=false

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 18, 2010 10:36 AM   in reply to upshotvideo

    @upshotvideo,

     

    For mx:List, I think Harui is suggesting something like the following:

     

    package comps {
        import flash.display.Sprite;
    
        import mx.controls.List;
        import mx.controls.listClasses.IListItemRenderer;
    
        public class NoHighlightList extends List {
            public function NoHighlightList() {
                super();
            }
    
            override protected function drawHighlightIndicator(indicator:Sprite, x:Number, y:Number, width:Number, height:Number, color:uint, itemRenderer:IListItemRenderer):void {
                // super.drawHighlightIndicator(indicator, 0, y, unscaledWidth - viewMetrics.left - viewMetrics.right, height, color, itemRenderer);
            }
        }
    }
    
    
    Peter

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 18, 2010 11:07 AM   in reply to Peter deHaan
     
    |
    Mark as:
  • Currently Being Moderated
    Jan 11, 2011 1:32 PM   in reply to upshotvideo

    With Spark, you just have to set the autoDrawBackground on false on your itemRenderer.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 13, 2012 3:56 AM   in reply to Peter deHaan

    Can we also remove the roll-over-text-color? like we did the roll over color.

    I want to be able to show roll-over-text-color on specific objects based on certain logic.

    Is that doable?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 14, 2012 7:17 PM   in reply to asharazeem

    It is probably doable.  How depends on whether you are using Spark or MX List

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 15, 2012 2:29 AM   in reply to Flex harUI

    Oh great! Its a MX List ,any suggestions?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 15, 2012 11:32 AM   in reply to asharazeem

    For mx:List, the renderer should set the label’s textColor property in an override of updateDisplayList.  You can check owner.isItemHighlighted to see if it is currently the roll-over item.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 18, 2012 12:52 AM   in reply to Flex harUI

    Thanks Ill check that and come back to you

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points