LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string control cursor location

Hello,
I have a string control into which I want to type things using the keyboard OR write programmatically. I turn the key focus on for that control (also after each programmatic write) and want the cursor ALWAYS to appear at the beginning of the next line after each pressing Enter or sending carriage return/line feed. The Enter key is assigned to another control (boolean type). When I write programmatically into the control and want to finish the line, I add a carriage return constant (but tried a line feed constant or a combination of both, too). Anyhow, the cursor stays where it is, it moves neither to the end of the line nor to the beginning of the next line. Typing with the keyboard into the string control and pressing the Enter
key doesn't send the cursor to the next line, either. In both cases I have to use the cursor down key of the keyboard to get to the next line. How can I avoid this????
0 Kudos
Message 1 of 3
(3,051 Views)
To programmatically place the cursor location in a string, use the Text.Selection:Start and Text.Selection:End properties. Set them both to the length of the string when you want to put the cursor at the beginning of the last empty line.


LabVIEW, C'est LabVIEW

Message 2 of 3
(3,051 Views)
Great! Such an easy solution, and it works fine. Thank you so much, Jean-Pierre!
0 Kudos
Message 3 of 3
(3,051 Views)