LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Formatting Text While Typing

I would like a text control to be formatted such that dashes or /'s are fixed, such as entering a phone number in the format of XXX-XXX-XXXX. As a user enters the numbers, the dashes stay fixed. Any clues?
0 Kudos
Message 1 of 3
(2,606 Views)
Use the event structure. On key down event, check length of your string control. If length = 3, concatenate the dash and wire it to the control's local variable. If length = 7, concat another dash. Do similar thing for dates.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 3
(2,606 Views)
Thanks, that's kind of what I thought. I just started using the event structure which is kind of interesting.
0 Kudos
Message 3 of 3
(2,606 Views)