LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String Entry which has to be limited

The entry should be of the format "A-00-xxx-000" where A is a alphabet,0 is numeric and xxx is fixed cannot ne varied by user and - should remain as -,   and this will be the fixed length... is it possible? If yes , kindly enlighten me!!!

0 Kudos
Message 1 of 8
(2,818 Views)

You don't have any readymade option available in LabVIEW but you can code it at the back. You can add "-", maintain the size and do whatever you want, remember you have to enable the option "Update while typing" in the String properties.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 8
(2,807 Views)
  1. But how do you make the "-" , stay there permanently???   
  2. And for Updating while Typing should I Use An Event Structure??
0 Kudos
Message 3 of 8
(2,804 Views)

Yes you have to use event structure, so when you enable the "Update while typing" the event will be fired whever you make any change at that instance itself. So based on the length of the string conactenate " - " to it.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 8
(2,798 Views)
Our use separate controls for the string and numerics.
0 Kudos
Message 5 of 8
(2,784 Views)

I'm kind of thinking the Key Down? event might be better.  That way you can discard the fact the the keyboard was even pressed for an invalid input.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 8
(2,757 Views)

I was nearly done with that .... the only problem I had the user had to do backspaces and than re-enter the value.... but know i've completely scrapped out that part... thanks all of you guys for your help

0 Kudos
Message 7 of 8
(2,749 Views)

This doesn't handle backspaces, either, but that'd be easy to add.

 

Example_VI.png

 

Rube Goldberg, anybody?

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 8 of 8
(2,743 Views)