Can text box input in C # be formatted to formatted?

I would just like to know if there is a function / way to limit the input of a text object to a formatted type, for example. the user can enter only the date in the text box; or a function similar to C analysis that I can use to achieve the same functionality?

thanks

+3
source share
3 answers

If you are writing a desktop application, you can use MaskedTextBox.

MaskedTextBox TextBox, . , :

  • .

  • .

  • , ; , - .

  • , MaskedTextBox; , (-) .

  • ; , .

+7

, , Masked Edit.

+2

, NumericTextBox DateTimePicker.

But as always, you can define your own controls and logic by overriding the default TextBox control.

-3
source

Source: https://habr.com/ru/post/1714228/


All Articles