interactionManager alwaysShowSelection?
Is there anything in the TextFlow.interactionManager (EditManager or SelectionManager) similar to the old TextField.alwaysShowSelection (to keep showing the selected/highlighted text even after loss of focus)?
Is there anything in the TextFlow.interactionManager (EditManager or SelectionManager) similar to the old TextField.alwaysShowSelection (to keep showing the selected/highlighted text even after loss of focus)?
There are three different selection states in TLF, and you can set a different display format for each one. The three states are: focus, no focus, and inactive. Focus is when the text has key focus. No focus means it does not have key focus, but it is in the active window. Inactive means that the window the text is in is not the active window.You can specify a different SelectionFormat for each state (see ISelectionManager focusSelectionFormat, inactiveSelectionFormat, and noFocusSelectionFormat). If you want the selection to be highlight but grey when it is not in focus, just set the noFocusSelectionFormat to grey.
Here's some example code that uses custom SelectionFormats, given a SelectionManager or a TextFlow:
var selectionManager:ISelectionManager = textFlow.interactionManager;
selectionManager.noFocusSelectionFormat = new SelectionFormat(0xa8c6ee, 1.0, BlendMode.NORMAL, 0xa8c6ee, 1.0, BlendMode.NORMAL, 0);
selectionManager.noFocusSelectionFormat = new SelectionFormat(0xe8e8e8, 1.0, BlendMode.NORMAL, 0xe8e8e8, 1.0, BlendMode.NORMAL, 0);
I hope this helps,
- robin
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.