Re: Prompt characters in a MaskedTextBox
"Pardee, Roy" <[email protected]> Wed, 6 Feb 2008 13:08:58 -0800
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <[email protected]> |
I imagine you could handle the paint event, but--can you give us background on why you don't want the actual characters the user types to show? If the entry is complicated enough to need regex validation, I would think blinding the users to what they're typing could possibly annoy them... -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]] On Behalf Of Bhatnagar, Amit Sent: Wednesday, February 06, 2008 7:57 AM To: [email protected] Subject: [DOTNET-WINFORMS] Prompt characters in a MaskedTextBox I have the need to create a customized text entry box that can accept various types of geographic coordinates. The problem=20 The MaskedTextBox only allows a single prompt character to be displayed upon user input. I need the ability to display different prompt characters for certain character positions. How can I do this? Also, due to the nature of the text being inputted, I suspect that I will need to use a regex to validate this properly. So I'm assuming because of these two limitations, that the MaskedTextBox isn't the way to go. Does anyone have any suggestions on how I can go about this? Use a regular text box and validate against a reg expression? But how do I handle displaying the custom prompt characters? The information contained in this e-mail message is PRIVATE. It may contain confidential information and may be legally privileged. It is intended for the exclusive use of the addressee(s). If you are not the intended recipient, you are hereby notified that any dissemination, distribution or reproduction of this communication is strictly prohibited. If the intended recipient(s) cannot be reached or if a transmission problem has occurred, please notify the sender immediately by return e-mail and destroy all copies of this message.=20 Thank you.=20