LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

<Urgent> How to fulfill multiple lines input in CVI front panel?

Hi Guys,

I want to paste multiple lines text from other files to CVI front panel, but String, Text Box or List Box can't do when I tried.

Could some one tell me how I can realize it or show me an example?

Thanks in advance!

 

0 Kudos
Message 1 of 5
(3,842 Views)

you could use the function ClipboardGetText from the User Interface Library; there is an example clipboard.cws that you might want to study (in samples / userint )

0 Kudos
Message 2 of 5
(3,838 Views)

To add line breaks into a textbox you need to insert some '\n' characters into your text.

 

For the string control, you can not use multiple line texts.

It is always single line.

 

For the list box, you need to add a new list item: a label and a corresponding value. You cannot make a single item appear as multiple lines.

 

For your application, I think, you only want to display plain text, right?

In that case, a text box is the best choice. Use the '\n' character whereever you need to insert a new-line.

 

Hope this helps,

S. Eren BALCI
IMESTEK
0 Kudos
Message 3 of 5
(3,832 Views)

Hi Ebalci and WlofGang,

Thanks very much for your help!

Now, my problem is that Test Box can't support "Right click ---> Past", right? So I can't use "Past" from right click popup menu, just "Ctrl + V" keyboard event.

Please kindly tell me the solution, thanks a lot!

 

0 Kudos
Message 4 of 5
(3,783 Views)

You can add this functionality by using RunPopupMenu to display your own menu when right-clicking on the control: see this discussion and the example attached to this post.



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 5 of 5
(3,777 Views)