2
I need that when a person type a word, automatically fills in front of the Textbox.
This is the DEFAULT text For Example:
- sdfdsfasfColor this text in Textboxsdfdsassdf
When I fill a piece of the above text in the Textbox,
- Lap(...)
The final result will have to look like this in the same Textbox that I type:
Blue can only disappear when the word is not equal to the standard, or is higher.
I created a code for this, but at the time of typing, the selected text does not follow the word sequence of the standard text.
private void TextBox1_TextChanged(object sender, EventArgs e)
{
int first = this.textBox1.TextLength;
string padrao = "asdfjdkjdfColocar esse texto no TextBoxqewprqewriworuoewi";
string textIndex = padrao.Remove(0, padrao.IndexOf(this.textBox1.Text, 0) + this.textBox1.TextLength);
this.textBox1.Text = this.textBox1.Text.Insert(this.textBox1.Text.Length, textIndex);
this.textBox1.Select(first, this.textBox1.Text.Length);
}
My goal is just to select the default text while typing and put in front of the current text.
Excellent! I’ve been trying this for days and nothing...
– sYsTeM