删除列表项底部的边框
红色突出显示部分!我该如何删除它?渲染列表的代码如下:
<s:List id="ui_lstIndexList" width="175" height="600" fontFamily="TwinCen"
fontSize="24"
alternatingItemColors="[]" borderVisible="false" downColor="#7fceff"
change="showAlert(event)" contentBackgroundColor="#6fa8bc" color="#FFFFFF"
dataProvider="{indexArrayCollection}" selectionColor="#7fceff">
<s:itemRenderer>
<fx:Component>
<s:IconItemRenderer labelField="name" messageField="artist"/>
</fx:Component>
</s:itemRenderer>
</s:List>
谢谢!!!
Highlighted portion in red! How do i remove it? Code to render list is below:
<s:List id="ui_lstIndexList" width="175" height="600" fontFamily="TwinCen"
fontSize="24"
alternatingItemColors="[]" borderVisible="false" downColor="#7fceff"
change="showAlert(event)" contentBackgroundColor="#6fa8bc" color="#FFFFFF"
dataProvider="{indexArrayCollection}" selectionColor="#7fceff">
<s:itemRenderer>
<fx:Component>
<s:IconItemRenderer labelField="name" messageField="artist"/>
</fx:Component>
</s:itemRenderer>
</s:List>
Thanks!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这不是一件“容易”的事情。您需要创建一个扩展 IconItemRenderer 的自定义类,并从那里重写受保护的函数drawBackground(unscaledWidth:Number, unscaledHeight:Number):void。您需要删除在函数末尾绘制分隔符的部分。我知道,这是愚蠢的,他们应该有一个样式,但你总是可以实现你自己的:
从这里,你只需要设置 topSeparatorColor、Alpha 或其他样式。或者甚至改变这一切并使用“showSeparator”样式将它们全部隐藏起来。你可以用它做任何你想做的事。
Not an "easy" thing to do. You need to create a custom class that extends IconItemRenderer and from there you need to override
protected function drawBackground(unscaledWidth:Number, unscaledHeight:Number):void
. You'll need to remove the part where it draws the separator at the end of the function. I know, it's idiotic, they should of had a style for that, but you could always implement your own:And from here, you just need to set the topSeparatorColor,Alpha, or other styles. Or even change all that and have a 'showSeparator' style which just hides them all altogether. You can do whatever you want with it.
单击您的 IconItemRenderer,然后开始输入“skinClass”。当您使用代码完成时,它将提供“新皮肤...”选项,使用它来创建新的可编辑皮肤。如果不存在,它将在列表皮肤中。
Click your IconItemRenderer, and start typing "skinClass." When you use the code completion, it will offer the option of "new skin..." Use that to create a new, editable skin. If it is not there, it will be in the List skin.