LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Overwriting default string in a string control

I would like to write an application that is able to overwrite a default string in a string control. Right now the best I have been able to do is set key focus via an attribute node so that the cursor is sent to the end of the default string of a string control. I would like the cursor to go the beginning of the default string and overwrite the default string
as new characters are entered. Currently my application adds any new characters to end of the default string of the string control. Thanks for any help!
0 Kudos
Message 1 of 3
(2,755 Views)
Use property nodes for Text.SelStart and Text.SelEnd as in the attached example.
- tbob

Inventor of the WORM Global
Message 2 of 3
(2,755 Views)
Create a property node. Set the Text.Selection >> Selection End property to a value larger than the longest string which will ever be entered. (I used the maximum value for a U32 = 4294967295). The Selection Start property defaults to zero, so these values will select the entire contents of the control when focus comes to the control. Anything typed will replace the contents.

Lynn
Message 3 of 3
(2,755 Views)