opensubscriber
   Find in this group all groups
 
Unknown more information…

d : dotnet-winforms@discuss.develop.com 8 February 2008 • 12:22AM -0500

Re: Prompt characters in a MaskedTextBox
by Phil Sayers

REPLY TO AUTHOR
 
REPLY TO GROUP




you may want to lookat some third party controls and see if they do this for
you.  Even if they don't quite do what you need, you can typically send them
a feature request.

The amount of time you may spend writing a robust control to do what you
want, you would have saved money by just buying it.

(I've found Devexpress winform UI controls to be well written, and designed
for inheritance so you can customize the controls)


-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:DOTNET-WINFORMS@DISC...]On Behalf Of
Bhatnagar, Amit
Sent: Wednesday, February 06, 2008 4:17 PM
To: DOTNET-WINFORMS@DISC...
Subject: Re: [DOTNET-WINFORMS] Prompt characters in a MaskedTextBox


I think you mis understood. I am only talking about the prompt
characters that are in the textbox that describe to the user the valid
characters to input (defined by the mask).

For example, the MaskedTextBox supports the display of

###-#####

The prompt character in this case is #, and the mask defined accepts any
digit. This prompt character makes sence for this type of input, so

555-5555

is valid input.

Note however that you could have # as the prompt character, but the mask
can be defined to accept only letters.. in this case # doesn't make
sence, so in this case gived the prompt character #,

aaa-aaaa

is also valid input.


But the point here is that only 1 prompt character can be defined.
Because of the complex nature of the text the user can input, I need the
ability to display specific prompt characters characters, for example

XX BB #### ####

this prompt character display will mean something to the user. This is
my problem - I cannot specifiy a customized prompt text.

I never mentioned "not allowing the user to see what he has typed"

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:DOTNET-WINFORMS@DISC...] On Behalf Of
Pardee, Roy
Sent: Wednesday, February 06, 2008 2:09 PM
To: DOTNET-WINFORMS@DISC...
Subject: Re: [DOTNET-WINFORMS] Prompt characters in a MaskedTextBox

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:DOTNET-WINFORMS@DISC...] On Behalf Of
Bhatnagar, Amit
Sent: Wednesday, February 06, 2008 7:57 AM
To: DOTNET-WINFORMS@DISC...
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

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.
Thank you.

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.