LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Text Box

Hi,
I am writing an application to using TCP/IP protocol. I want the application to use ONE text box for receiving and transmitting. The problem I have is, if I receive a transmission and then print this to the text box I then want to limit the user from scrolling the cursor back up the text box. I would like the user only to be able to type from the current position of the cursor (the end of the last transmission). I can't see anyway of doing this at the moment. Any ideas??

Thanks
James
0 Kudos
Message 1 of 5
(3,591 Views)
I've developed something similar for a serial application mimiking a terminal application. I was a little tedious but I managed to get it to work like that by adding fake keystrokes using the function from the user interface library. In doing that I made sure that the cursor is where I waanted it to be when the user clicked on the window.

You can then swallow the up arrow key events in your app actively preventing the user from scrolling up. There is a thread in this forum discussing swallowing keystrokes.
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 2 of 5
(3,591 Views)
I believe this may be the thread Jattie is refering to, let me know if it's not Jattie.

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5065000000080000004ED30000&UCATEGORY_0=_318_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=Ignore+paste+shortcut&USEARCHCONTEXT_QUESTION_S=0

Regards,
Ryan K.
0 Kudos
Message 3 of 5
(3,591 Views)
Cheers for your help Jattie & Ryan, I have got it working now.
0 Kudos
Message 4 of 5
(3,591 Views)
No, I actually refered to this one, have to admit it's quite difficult to find a discussion threat again once it's closed or resolved!

Swallow Events
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 5 of 5
(3,591 Views)