Can any one please tell me how to check whether the text in a mx textinput control is selected or not.I have some controls like mx textinput, mx textara and richtexteditor. selection comes from when user drags it or double click on any control the selection highlights at that time i want to know which control is selected.I have seen the solution for spark textinput which is posted in stackoverflow
How to access the selected text in a Flex TextInput control
but i want for mx components.Please tell me how to know which control text is selected for textinput,textarea and richtexteditor controls.
Thanks
Can any one please tell me how to check whether the text in a
Share
For
TextInputandTextArea:For
RichTextEditor:This will check if the component has any selected text, but not whether the component is selected; the text selection stays even when the component loses focus. The easy way to check if the component actually has focus is by setting a boolean flag in the component’s
focusInandfocusOutevents. You could also deselect the text in afocusOutevent: