Making Flex HTML Control UnSelectable
I am displaying some HTML text in an Adobe AIR application that I do not want the user to be able to cut and paste. How do I force an HTML control to disable HTML highlighting without disabling ScrollBars. mouseChildren = false works but disables scrollbars which are unacceptable. Right now I have:
<mx:HTML location="http://dexter/preview.html" width="100%" height="100%" id="PreviewArea" x="0" y="0" tabEnabled="false" tabChildren="false" focusEnabled="false" focusRect="null"/>
But it doesn't work either. I also tried overlaying the disabled transparent text control on top of the HTML component, but the user can still tab in the HTML and use the keyboard controls to copy the text to the clipboard.
Any hints?
a source to share
You probably need to extend the HTML component. Make scrollbars, if applicable, usable, but set mouseEnabled, mouseFocusEnabled, mouseChildren and focusEnabled to false on the internal display.
Alternatively, you can wrap the HTML component in a canvas. Set the HTML component to Measured Height and Measured Width. Set the HTML component as "unusable" with the above properties, but make it usable.
Whether the HTML component is displaying rendered HTML; not HTML text? If you are showing HTML text, you can use TextArea and set to edit and select false.
a source to share