Hi!
textbox and button:
I have a textbox that I limited the maxlenght to 10 caracters.
Then if I insert for example 3 caracters its will left 7 blank or white spaces. This 7 blank spaces left I need to be filled automatically with a "---------" until at the maximum of 10 caracters.
In other way, each number of caracter(s) inserted cannot have blank space letf inside of the textbox. Otherwise should be filled with this line "---------".
But if I insert 10 caracters then there is not need to fill the rest of my textbox.
Many thanx

Hemant SrivastavaRank #581 · 4.2K reputationPosted May 27, 2015, 11:55 AM EDT
For this, you need to add a Masked Text Box on your winForm. and Set following properties either through property window or through code (on Form load method);
this.maskedTextBox1.AsciiOnly = true;
this.maskedTextBox1.Mask = "CCCCCCCCCC";
this.maskedTextBox1.TextMaskFormat = System.Windows.Forms.MaskFormat.IncludePromptAndLiterals;
IsraelRank #1,223 · 1.5K reputationPosted May 26, 2015, 10:44 AM EDT
Hemant SrivastavaRank #581 · 4.2K reputationPosted May 26, 2015, 12:34 PM EDT
IsraelRank #1,223 · 1.5K reputationPosted May 27, 2015, 7:37 AM EDT
IsraelRank #1,223 · 1.5K reputationPosted May 29, 2015, 7:38 AM EDT
IsraelRank #1,223 · 1.5K reputationPosted Jun 1, 2015, 4:59 AM EDT