Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limit Textbox Entries - VB.Net2003

Status
Not open for further replies.

dcranford

MIS
May 18, 2000
131
US
I want to limit entries into a textbox to STANDARD, RUSH, and SUPER

This version of VB.net does have a mask property for textboxes (and maybe mask is not what I'm looking for). It would make sense that once the user pressed the 'R', that RUSH would fill into the box as well as the ST or SU doing the same. What are my options? Any sample code you'd present would be appreciated.

Thanks

Deon Cranford

 
Slightly sarcastic but effective. There was method to my madness...I'm converting an old Paradox application and was trying to duplicate the look and feel of the existing app for the current users. Pdox uses "pictures" to define the elements and needs no vertical scroll bar. They'll just have to get use to it.

Deon Cranford

 
Sorry. All I saw at first glance was an obvious attempt at "Square peg, Round Hole".

If you really want that other option you can start by using the KeyPress (to capture the "R" or "r" and set TextBox.Text value to "Rush", or maybe beep on incorrect key or something) and LostFocus (if you want to revalidate the value) Events of the TextBox control. It's just that all that stuff it kind of taken care of for you in a DropDown.


Senior Software Developer
 
I'm sticking with your original solution. I agree 100% in not having to reinvent the wheel. Thanks for the input.

Deon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top