LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Set Cursor Position in Textbox

Hello,
 
I need to
a) initialize a textbox control with a message, and
b) set the cursor of the textbox right after that message.
 
While a) can be done with ResetTextBox(...), I'm wondering if anyone can tell me how to set the cursor to the end of the initialization string.
 
I'm using CVI 8.01
 
Thanks in advance
Greg
0 Kudos
Message 1 of 3
(3,810 Views)

Hello Greg,

you should use the SetCtrlAttribute function with ATTR_TEXT_SELECTION_START. If no text is selected, the attribute value represents the offset of the caret.

0 Kudos
Message 2 of 3
(3,810 Views)

Hello Wim,

Wow, that was fast and precise. That was exactly the info I was looking for.

Thanks a lot!
Greg

0 Kudos
Message 3 of 3
(3,806 Views)