[NOTE: The "typing cursor" is not to be confused with the Waveform Graph "Cursor" List.]
I am working on a VI that watches what my end-users are typing into a String Control [via the "UpdtWhileTyping" property of the String Control] and corrects [on the fly] for some standard data-entry errors that we see.
Most of the time, the corrected strings are shorter than what the user had typed, and the "typing cursor" remains at the end of the string, as it should.
On very rare occasions, however, the corrected string is longer than what the user had typed, and in that case, I get bad behavior: The LabVIEW string control insists on keeping the "typing cursor" at what had been the end of the shorter string typed by the user.
I have attached a simple VI, "Append 9.vi", which illustrates the problem - when a user types any key, the VI appends the character "9" to the end of the string.
Now if the user were to type "a" followed by "b" followed by "c", I'd like them to see the following [where "|" indicates the typing cursor]:
a9|
a9b9|
a9b9c9|
Instead, they see the following:
a|9
ab|99
abc|999
Is there any way to move the "typing cursor" programmatically, so that I can get it back to the end of the string? Alternatively, is there any way to fire a keyboard key programmatically, so that I could e.g. fire the "End" key, and move the cursor to the end of the string?
Thanks!