Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
How do I fix the input allowed into an input box?

Basically I want the user to be only allowed to type in numberical values (no spaces or symbols) also I want the inputbox to appear in this structure

02:10:20

And I don't want the user to be able to delete the colons.

How do I do this?
Posted

1 solution

I'd use a DateTimePicker, not a TextBox.
 
Share this answer
 
Comments
Andrew Smith 28-Jan-13 9:29am    
I'm using an inputbox. Do you know how I can accomplish what I have outlined above?
PIEBALDconsult 28-Jan-13 9:32am    
Heck no; I wouldn't try. Use the right tool for the right job.
Sergey Alexandrovich Kryukov 28-Jan-13 12:01pm    
Totally agree. Doing it with a text box is just silly. My 5.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900