Copy to clipboard from WebListBox

If you select the way I described, with the mouse, it does what the picture shows, and it copies… To any text editor. Note this is NOT a selection as the Weblistbox shows by code or when one clicks on a row.

It does paste here in a new Excel workbook.

As Michel said, when a WebListBox has selected rows, you can not use normal copy and paste from them as they are not selected in the same way that you select text in a text field or normal web page with a click and drag of the mouse. It is a styling effect, and trapping the Keypressed event won’t help either.

Again, like Michel said, you can click and drag from outside of the WebListBox to select the underlying text of the WebListBox, but that will not select just the rows you have “selected”, it is continuos and will not skip unselected rows that you drag through.

There is likely a JavaScript workaround, but that’ll be an interesting project. :slight_smile:

Thanks.

Sorry I’m coming in so late (darn vacations)…

Indeed, there is currently no support for clipboard operations in the web framework. The reason is quite simple… To interact with the user’s clipboard, you have to do it in the exact same event loop as the keyboard press on the browser. Because our framework sends all events to the server for processing, that requirement is immediately broken. without the round trip to the server, you can’t actually decide what gets copied at runtime, so it becomes a chicken and egg problem.

does this mean you can’t paste into a field? I thought I’d done that before…

Of course you can paste into a field.

the paste is handled client side in the browser

fair enough. makes sense.

But it seems as though there are some cut/paste operations that are supported client-side and some that are not.

Is this behavior documented anywhere?

If we wanted to present a list or table of information to the user in a manner that allowed them to copy it, how would we do so?

[quote=247219:@Steve Upton]fair enough. makes sense.

But it seems as though there are some cut/paste operations that are supported client-side and some that are not.

Is this behavior documented anywhere?

If we wanted to present a list or table of information to the user in a manner that allowed them to copy it, how would we do so?[/quote]

The way I described way above, together with a JavaScript snippet, works : place the text in a WebTextArea and select it for the customer. Eventually display some instructions to press Ctrl-C or Cmd-C.