LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to load text files in GUI

plz tell me .. how to load and compare two text files using file popup's . example file i have attached..

0 Kudos
Message 1 of 4
(3,662 Views)

I don't understand whether your question is on how to load text files or how to show them on a panel or how to compare them... or all aspects together!

 

The first operation (loading the file) can be accomplished with functions included in the Formatting and I/O Library like OpenFile, ReadFile and so on; with a file like yours even FileToArray could be an option.

 

How to show the data on screen is heavily dependent on what you intend to do with them: data can be shown in textboxes, listboxes, tables or graphs so... what do you want to do?

 

The same applies with comparison: without additional details is difficult to give you the proper hint.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(3,647 Views)

Do you want something like that ? (see ZIP attached)

> You can click on "file 1" control to make a popup appear.

> Same thing for "file 2".

> Click "COMPARE" button.

In the ZIP, you will find 2 text files for testing...

 

Be careful...that's just a quick example : if you take this you will need to handle file errors ! Moreover there are probably some particular cases that I have not handled.

 

0 Kudos
Message 3 of 4
(3,583 Views)

Note that using 1 for loop for each colum of the table (so 3 for loops) is a little bit dirty...I should have used only 1 for loop !

0 Kudos
Message 4 of 4
(3,579 Views)