From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I select a group of cells in a multicolumn listbox?

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.

 

0 Kudos
Message 1 of 4
(2,759 Views)

Hi,

 

Attaching your code may give a bit more clear picture of what you are doing.

 

Regards,

 

Nitz..

0 Kudos
Message 2 of 4
(2,734 Views)

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?

 

Download All
0 Kudos
Message 3 of 4
(2,729 Views)

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

Message 4 of 4
(2,700 Views)