LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cursor Position After String Update

Solved!
Go to solution

Hi,

 

I'd like to update a string by clicking on a button, which then concatenates the existing string with another, and then have the key cursor move to the end of the updated string once it's brought back into focus.

 

Example;

 

I have the existing string abcd with the key cursor as follows - abcd| , when I click the 'a' button I want abcda| , not abcd|a where '|' represents the key cursor position.  On another note, I don't want to have the added string highlighted, I'm aware of how to achieve this.

 

I've searched for the answer to this but I can't find it.

 

Thanks.

 

LabVIEW 8.5, if possible.  Cheers.

---------------------------------------------------

LabVIEW 8.5 User.
0 Kudos
Message 1 of 3
(2,806 Views)
Solution
Accepted by topic author cevert73

It's a little tricky because there isn't a specific "cursor position" property. You need to get the string length and use the selection->start and selection-> end properties. You set them both to the same thing (string length)

 

Message 2 of 3
(2,796 Views)

Just what I was looking for.  Thanks a lot!

 

Cheers.

---------------------------------------------------

LabVIEW 8.5 User.
0 Kudos
Message 3 of 3
(2,784 Views)