I want to auto format a text entered in a textbox like so:
If a user enters 2 characters, like 38, it automatically adds a space. so, if I type 384052 The end result will be: 38 30 52.
I tried doing that, but it's ofr some reason right to left and it's all screwed up.. what I'm doing wrong?
static int Count = 0; private void packetTextBox_KeyPress(object sender, KeyPressEventArgs e) { Count++; if (Count % 2 == 0) { packetTextBox.Text += " "; } } Thanks!
MaskedTextBoxbut doesn't know the name of it.nnumber of characters without any limit but with single space each for two characters? What will you do when user deletes a character usingdeleteorbackspace?