12-09-2010 07:48 AM
Hi.
I'm using a multicolumn listbox to present logging data, figuring that it was a good way to visually separate the received data so that it'd be more readable. But at runtime, is it possible to highlight/select a group of cells/rows/columns like in Excel, and copy these to the clipboard using Ctrl+C? Or is there a different control better suited for this?
Thanks.
12-10-2010 05:54 AM
Hi,
Attaching your code may give a bit more clear picture of what you are doing.
Regards,
Nitz..
12-10-2010 06:00 AM
Yes, of course. I'm sorry - I just thought the question was so general that no code was needed. My bad.
Here is the code I have made so far. As I said, right now I'm using a multocolumn listbox. And at runtime, this listbox will be filled with various strings, representing headers, timestamps, logged data, etc. Is it possible to use the mouse to select a group of these cells and copy them e.g. into a text editor, like you would do in Excel?
12-15-2010 06:29 AM - edited 12-15-2010 06:29 AM
Hi.
I do not think this can be done the way you describe.
If you however use a Table Control you can rightclick it and select Export -> To Excel or Clipboard. This will export the entire dataset.
If you would like to keep the betterlooking headers of the listbox you can just minimize it and place it on top of the Table Control.
Otherwise I think you will have to programatically get the numbers with use of controlls and array functions.
You can for instance read all the data you want to an invisible Table Control, and use the invoke method Copy to Clipboard.
-Tom