简体   繁体   中英

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. 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.

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. In MyColorPickerSkin you can add a button which will be closes the component.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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