如何更改Flex Tile列表中Tile之间的创建间隙或悬停图像的宽度,以便您可以在项目之间看到背景图像



我创建了一个带有自定义项渲染器的tile列表,在功能方面,它可以正常工作。我将项目渲染器的宽度和高度降低到95%,然后在该项目的剩余5%中显示平铺列表背景。问题是,只有当我将鼠标悬停在项目上时,背景才会被掩盖,并且我无法在项目之间显示间隙。是否可以更改悬停的高度和宽度?我是不是错过了一些简单的东西?

<mx:Canvas id="Card2" label="Card2" width="100%" height="100%" backgroundColor="#FFFFFF">
    <mx:TileList id="tlCard2" x="10" y="10" dataProvider="{acCard2}" width="580" height="340" dropEnabled="true" borderThickness="0" maxColumns="4" maxRows="4" rowHeight="85" columnWidth="145" borderColor="#000000" horizontalScrollPolicy="off" verticalScrollPolicy="off" borderStyle="solid" dragMoveEnabled="true" dragEnabled="true" backgroundImage="{imgGuide}" themeColor="#BCBCBC">
        <mx:itemRenderer>
            <mx:Component>                          
                <mx:Image source="{assets/' + data.imageId + '.jpg'+ '?cachekill='' + new Date()}" horizontalAlign="center" verticalAlign="middle" width="95%" height="95%" scaleContent="false" maintainAspectRatio="true"/>                              
            </mx:Component>
        </mx:itemRenderer>
    </mx:TileList>
</mx:Canvas>

提前感谢!:)

对于火花组件,您有autoDrawBackground="false"

尝试http://blog.flexexamples.com/2010/04/22/removing-the-rollover-and-selection-highlight-on-a-spark-list-control-in-flex-4/

对于mx,请尝试useRollOver=false

尝试http://blog.flexexamples.com/2008/02/01/disabling-item-roll-over-highlighting-in-the-flex-datagrid-control/

TileList继承了paddingTop paddingBottom属性设置,这些属性设置应该执行此操作。

您可以尝试的另一件事是设置TileList的rowHeight,并将itemRenderer的高度设置为小于rowHeight 的值

我认为您应该使用填充样式家族。

最新更新