简体   繁体   中英

AS3 - Highlighted text color

Does Flash auto set the color of highlighted text? For some reason it is some kind of blue. How can I change it to white for example?

Screenshot: http://i.stack.imgur.com/b6jnu.jpg

Thanks.

This can't be done using pure ActionScript unless you want to try to write your own implementation of TextField, which I can only imagine would be a nightmare.

Flex allows you to set styles for selected text colors, which I'm guessing is what is being used in the screenshot you posted. Here's a blog entry on how to do it using Flex 4:

http://blog.flexexamples.com/2009/11/07/setting-the-selection-highlight-color-on-a-spark-richeditabletext-control-in-flex-4/

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