Given the situation: [code] TextBox txtBoxSrc = new TextBox(); TextBox txtBoxDest = new TextBox(); [/code]
I think the simplest way to copy the first textboxes text into the second is: [code] txtBoxDest.setText(txtBoxSrc.getText()); [/code] Dmitry Sterinzat wrote: > Does it work only for IE or it's crossbrowser code? > > 2009/3/24 Kevin Tarn <[email protected]>: > >> You can try below JSNI methods: >> public static native void copyFrom(com.google.gwt.user.client.Element >> element) /*-{ >> $wnd.window.clipboardData.setData('text', element); >> }-*/; >> >> public static native void pasteTo(com.google.gwt.user.client.Element >> element) /*-{ >> $wnd.window.clipboardData.getData(element); >> }-*/; >> >> Kevin >> >> On 3/24/09, Harry <[email protected]> wrote: >> >>> Hi, >>> >>> My project is that user is enabled to copy the content of a text box >>> and paste it on another form using 'Copy' button. Please advice how to >>> do it as GWT is not support copying to system clipboard. >>> >>> Please help its important. >>> >>> Thanks >>> >>> Harry >>> >>> >> > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
