11-09-2014 08:44 PM
Is there any property or method in string control that can modify input character to upcase character?
Solved! Go to Solution.
11-09-2014 09:17 PM
Yes, there are functions available in String pallet, function name "To upper case" and "To lower case" user the one you want.
11-09-2014 09:28 PM
reading between the lines on your post (because there's not enough information to say for sure), it looks like you want to have a string control on your front panel and if a user types a lower case character you'd replace it real-time with the uppercase equivalent? Is it good enough to convert to uppercase after they hit enter or move to a different control?
If it needs to be done as soon as the key is pressed, have a look at the attached. One easy-to-overlook thing is "update value while typing" setting (right click on front panel string control).
11-09-2014 09:28 PM - edited 11-09-2014 09:31 PM
sorry for redundant post
11-09-2014 11:11 PM
Hi,
I try your VI. but it seems the character unable to upper and display at real time. So maybe you should update your VI so that the control can display upper case once I type a character.
11-09-2014 11:23 PM - edited 11-09-2014 11:24 PM
Try attached VI.
Edit: Make sure update while typing property is selected.
11-09-2014 11:56 PM
@Miraz_Automation wrote:
Try attached VI.
Edit: Make sure update while typing property is selected.
Why do you have a timeout and the stop button by itself? Why not simply have an event for the stop button, also?
11-10-2014 12:06 AM
Hi Billko,
Idea was to show the uppercase conversion. rest is just quickly made code not at all ideal.
thanks for pointing out, point noted.
11-10-2014 12:46 AM
My version from post 3 works for me and I can't see a weakness that would cause it to not work for the OP. Anybody?
11-10-2014 02:58 AM - edited 11-10-2014 02:59 AM
It's very tricky.
I have to put a wait before the string in the event case, even to 2ms(1ms is not enough).
Moreover, I have to add the key repeat event case for the string so that the string can be immediately displayed.
It seemed that the KEY DOWN event is faster than VALUE CHANGE so that key down event is triggered but value change yet.