I do not understand what you are talking about.
If the StyledText widget is READ_ONLY, the copy operation is available
(select some text and press CTRL-C), but you cannot paste to or cut from the
widget since it is readonly. Also note that there is API in the StyledText
widget to cut, copy and paste programatically.
"kyle farnand" <kfarnand@xxxxxxxxxxxxx> wrote in message
news:b7mtas$n7d$1@xxxxxxxxxxxxxxxx
When I use the below code, I get copy and paste for free.
>Text modelText = new Text(modelXMLContainer, SWT.READ_ONLY |SWT.MULTI);
>modelText.setText(modelString);
But when I used the StyledText widget, I lose this functionality.
>StyledText modelText = new StyledText(modelXMLContainer, SWT.READ_ONLY);
>modelText.setText(modelString);
An earlier post said I should get the same copy and paste functionality
if I use SWT.READ_ONLY in the constructor from both widgets but that is
not the case.
Is there an easy way to get this copy and paste functionality out of the
StyledText widget (as in the Text widget) or do I have to implement it
myself?