简体   繁体   English

自定义Flex颜色选择器以具有关闭按钮

[英]Customize Flex color picker to have close button

I would like to customize a color picker in Flex so that it would have a close button on the top. 我想在Flex中自定义颜色选择器,使其在顶部具有关闭按钮。 This close button simply closes the color picker. 此关闭按钮只是关闭颜色选择器。

I have googled it but have failed to find a way to do it. 我已经用谷歌搜索了,但是没有找到一种方法。

If anyone could point me in the right direction it would be of great help. 如果有人能指出正确的方向,那将有很大帮助。

I'm using Flash-Builder 4.6. 我正在使用Flash-Builder 4.6。

You need create your own color picker skin class and add to this skin close button. 您需要创建自己的颜色选择器皮肤类并将其添加到此皮肤关闭按钮。 Open mx.skins.spark.ColorPickerSkin class and copy its code to your own MyColorPickerSkin class. 打开mx.skins.spark.ColorPickerSkin类,并将其代码复制到您自己的MyColorPickerSkin类中。 In MyColorPickerSkin you can add a button which will be closes the component. 在MyColorPickerSkin中,您可以添加一个将关闭组件的按钮。

 <mx:ColorPicker id="cp"
        skin="MyColorPickerSkin"/>

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

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