Set TextBox format or mask (V 8.03.409C)

I was hoping there was a way to set the textbox object to do all that for me.  Guess I'll have to code it.

Thanks for the link too.

Calvin

I need to store a 5 digit code as a string, so I'm using ShortChar02, but need to limit input to a 5 character numerical code.


Why not use a number instead, you ask?  Because future codes may contain letters.


So I need to limit the string entered to 5 numerical characters.  For example: 

Good values: '00000' , '12345', '00101', '98765', etc ...

Bad values: '0', '1234', '1234A', '123456', '12-34', etc...


Any way to set an input mask on a EpiTextBox?  


Or must I use code to check the length and for valid characters?


Thanks in Advance,


Calvin


P.S. Version 8.03.409C

There are a number of ways but the most basic thing to remember is the EpiTextBox is basicly a .net textbox and any routines that would validate text can be used.  A quick google will result in many different approaches from using keypress to text change and validating events.  Here is a random one as an example,

http://stackoverflow.com/questions/9969824/vb-net-need-text-box-to-only-accept-numbers
 
You can also put a field change event on the associated field or a BPM that checks the values when a save is attempted.

Jim Kinneman
Encompass Solutions, Inc