Saturday, February 26, 2011

How to select text in browser (label, panel, etc)

I'd like to have text preselected for the user so that he'd only need
to Ctrl+C it.

In javascript I was using:

var div = document.body.createTextRange();
div.moveToElementText(el);
div.select();

But I didn't find similar functionality in GWT - is it available? How
it can be implemented if not?

Thanks, Anatoliy

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment