Flex / FlashBuilder :: Spark List / IconItemRenderer ::禁用选择高亮显示/不选择/删除选择 [英] Flex/FlashBuilder :: Spark List / IconItemRenderer:: Disable Selection Highlight / No Selection / Remove Selection

查看:188
本文介绍了Flex / FlashBuilder :: Spark List / IconItemRenderer ::禁用选择高亮显示/不选择/删除选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用IconItemRender删除火花列表的选定状态和停止状态颜色时遇到了困难。如果您正在制作移动应用程序并使用IconItemRender(而不是ItemRenderer),则不存在autoDrawBackground属性。

I had trouble removing the selected and down state colors for a spark list using IconItemRender. If you are making a mobile app and using IconItemRender (instead of ItemRenderer) there is no autoDrawBackground property.

我想我会把它放在这里,到本页: http: //www.sajeevkumar.com/2012/01/08/flex-4-6-list-mobile-iconitemrenderer-background-image/

I figured I'd drop it in here after figuring it out thanks to this page: http://www.sajeevkumar.com/2012/01/08/flex-4-6-list-mobile-iconitemrenderer-background-image/

推荐答案

您可以通过执行以下操作来减少向下和选定的颜色。使用IconItemRender查看列表中项目的更多控制,查看LabelItemRenderer类和drawBackground函数。
$ b

You can do the following to muck around with the down and selected colors. For more control over items in a list using IconItemRender look at the LabelItemRenderer class and the drawBackground function.

override protected function drawBackground(unscaledWidth:Number, unscaledHeight:Number):void {

            var bgColor:uint = 0xffffff;

            graphics.clear();

            graphics.beginFill(bgColor,1);
            graphics.lineStyle();
            graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);
            graphics.endFill();

            // Draw the separator for the item renderer
            super.drawBorder(unscaledWidth, unscaledHeight);

            opaqueBackground = bgColor;
        }

这篇关于Flex / FlashBuilder :: Spark List / IconItemRenderer ::禁用选择高亮显示/不选择/删除选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆