Prompt characters in a MaskedTextBox

  • Thread starter Thread starter Flyte
  • Start date Start date
F

Flyte

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?
 
Flyte said:
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?

You could like at a RichTextbox control. It has a lot of features that can
be used.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top