简体   繁体   English

如何在 Flex Spark Datagrid 中设置选择边框颜色

[英]How do I set the selection border color in Flex Spark Datagrid

I have a custom skin applied to a Flex 4 spark datagrid.我有一个自定义皮肤应用于 Flex 4 火花数据网格。 One really annoying issue I am having is finding the ability to override or change the selected row border color.我遇到的一个非常烦人的问题是找到覆盖或更改所选行边框颜色的能力。 I was able to set the selectionColor just fine but the border is still the default light blue color.我能够很好地设置 selectionColor 但边框仍然是默认的浅蓝色。 I need it to be yellow.我需要它是黄色的。

Anyone know where I can find this style or override this border that is being set when selection happens within the skin itself.任何人都知道我在哪里可以找到这种样式或覆盖在皮肤本身内进行选择时设置的这个边框。

thanks, -Matthew谢谢,-马修

I believe it's the caretColor style.我相信这是 caretColor 风格。 If not, you can do this:如果没有,您可以这样做:

Create a skin file for the spark datagrid based on spark.skins.spark.DataGridSkin Now yous hould have a copy of the DataGrid skin, change the following code,基于 spark.skins.spark.DataGridSkin 为 spark datagrid 创建一个皮肤文件 现在你应该有一个 DataGrid 皮肤的副本,更改以下代码,

 <s:stroke>
    <!--- @private -->
    <s:SolidColorStroke id="caretIndicatorFill" color="0x0167FF" weight="1"/>
 </s:stroke>

Change 0x0167FF to the desired color..将 0x0167FF 更改为所需的颜色..

A bit late, but FYI there is no need to edit the skin, there is a style caretColor on spark DataGrid:有点晚了,但仅供参考,不需要编辑皮肤,spark DataGrid 上有一个样式caretColor

<s:DataGrid caretColor="0xffffff" ...

Hope that helps希望有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM