Skip to main content
March 9, 2011
Question

SelectionHighlighting = always not works with new EditManager

  • March 9, 2011
  • 1 reply
  • 902 views

Hi,

I am working on a TLF editor. I set the selectionHighlighting = "always" for the RichEditableText and everything is fine. The text remains highlight when the control is unfocused. However, after I added the EditManager,

richEditableText.textFlow.interactionManager = new EditManager(new UndoManager());

The selectionHighlight = "always" not works anymore, the text highlight color changed and no more follow the "focusedTextSelectionColor", "unfocusedTextSelectionColor", "inactiveTextSelectionColor".

How can I use the selectionHighlighting = "always" with the EditManager at the same control?

Thanks

This topic has been closed for replies.

1 reply

Adobe Employee
March 9, 2011

This question might need to be put on the Flex Forum. I suspect what is happening is that in order to implement the selectionHighlighting property, Flex has supplied an EditManager to the TextFlow. It set it up its EditManager with selectionFormats as you specified. When you override the EditManager with your own EditManager, your EditManager may not be looking at the flag the way the old one was, and it does not have the same selectionFormats as the old one. Can you tell us why you need your own EditManager in this case? Perhaps there is another solution.

Thanks,

- robin

March 10, 2011

I  am creating a EditManager in order to use the UndoManager functions. After a night of trial, I figure out a solution by forcing the selection formats after assigned the new EditManager.

richEditableText.textFlow.interactionManager.focusedSelectionFormat = new SelectionFormat(0xFFFFFF, 1, "difference", 0xFFFFFF, 1);

richEditableText.textFlow.interactionManager.unfocusedSelectionFormat = new SelectionFormat(0xFFFFFF, 1, "difference", 0xFFFFFF, 1);

richEditableText.textFlow.interactionManager.inactiveSelectionFormat = new SelectionFormat(0xFFFFFF, 1, "difference", 0xFFFFFF, 1);

At least it solve my problem so far.

Thanks.